Skip to content

Commit

Permalink
ci: Add GitHub Actions integration
Browse files Browse the repository at this point in the history
  • Loading branch information
yvbbrjdr committed Jan 23, 2021
1 parent 039c8e2 commit c8a71a4
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 2 deletions.
102 changes: 102 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Package

on: [push, pull_request]

jobs:
build_linux:
name: Linux Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Qt
uses: jurplel/install-qt-action@v2

- name: Install libsodium
run: sudo apt install libsodium-dev

- name: Build
working-directory: ./LANDrop
run: qmake && make -j$(nproc)

package_windows:
name: Windows Package
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Qt
uses: jurplel/install-qt-action@v2

- name: Install libsodium
shell: bash
run: |
curl -LO https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-stable-msvc.zip
unzip libsodium-1.0.18-stable-msvc.zip
- name: Configure
shell: bash
working-directory: ./LANDrop
run: |
echo "INCLUDEPATH += ../libsodium/include" >> LANDrop.pro
echo "LIBS += -L../libsodium/x64/Release/v142/dynamic -llibsodium" >> LANDrop.pro
- name: Build
shell: cmd
working-directory: ./LANDrop
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
qmake -tp vc
msbuild -m -p:Configuration=Release .
- name: Package
shell: bash
working-directory: ./LANDrop
run: |
mkdir LANDrop
cd LANDrop
mv ../release/LANDrop.exe .
windeployqt LANDrop.exe
cp ../../libsodium/x64/Release/v142/dynamic/libsodium.dll .
curl -LO https://aka.ms/vs/16/release/vc_redist.x64.exe
- name: Zip
working-directory: ./LANDrop
run: Compress-Archive LANDrop LANDrop-win.zip

- name: Upload
uses: actions/upload-artifact@v2
with:
name: Windows-Build
path: LANDrop/LANDrop-win.zip

package_macos:
name: macOS Package
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Qt
uses: jurplel/install-qt-action@v2

- name: Install libsodium
run: brew install libsodium

- name: Build
working-directory: ./LANDrop
run: qmake && make -j$(nproc)

- name: Package
working-directory: ./LANDrop
run: |
macdeployqt LANDrop.app
zip -r9 LANDrop-macos.zip LANDrop.app
- name: Upload
uses: actions/upload-artifact@v2
with:
name: macOS-Build
path: LANDrop/LANDrop-macos.zip
6 changes: 4 additions & 2 deletions LANDrop/LANDrop.pro
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ TRANSLATIONS += \
RC_ICONS = icons/app.ico
ICON = icons/app.icns

INCLUDEPATH += /usr/local/include
LIBS += -L/usr/local/lib -lsodium
unix {
INCLUDEPATH += /usr/local/include
LIBS += -L/usr/local/lib -lsodium
}

QMAKE_INFO_PLIST = Info.plist
2 changes: 2 additions & 0 deletions LANDrop/crypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include <stdexcept>

#include <sodium.h>

#include "crypto.h"
Expand Down
2 changes: 2 additions & 0 deletions LANDrop/filetransferserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include <stdexcept>

#include "filetransferdialog.h"
#include "filetransferserver.h"

Expand Down
2 changes: 2 additions & 0 deletions LANDrop/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include <stdexcept>

#include <QApplication>
#include <QMessageBox>
#include <QTranslator>
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# LANDrop

![Package](https://github.com/LANDrop/LANDrop/workflows/Package/badge.svg)

Drop any files to any devices on your LAN.

0 comments on commit c8a71a4

Please sign in to comment.