summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2021-03-06 23:46:51 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2021-03-12 11:56:27 +0000
commitabc7e7425b4bab955ef000ea4dc05d636f028f58 (patch)
treef84ff1929ff8ac47388b3fe18f45e909c51c9d90
parent222245038cb3989bc6bcdfb6735bfb1e1017b71a (diff)
downloadmullvadvpn-abc7e7425b4bab955ef000ea4dc05d636f028f58.tar.xz
mullvadvpn-abc7e7425b4bab955ef000ea4dc05d636f028f58.zip
Add daemon build job for Linux
-rw-r--r--.github/workflows/daemon.yml63
-rwxr-xr-xci/check-rust.sh22
2 files changed, 85 insertions, 0 deletions
diff --git a/.github/workflows/daemon.yml b/.github/workflows/daemon.yml
new file mode 100644
index 0000000000..69a0991b3f
--- /dev/null
+++ b/.github/workflows/daemon.yml
@@ -0,0 +1,63 @@
+name: Mullvad VPN daemon CI
+on:
+ # Build whenever a file that affects a Rust crate is changed by a push
+ push:
+ paths-ignore:
+ - '**/*.md'
+ - .github/workflows/android*.yml
+ - .github/workflows/rustfmt.yml
+ - android/**
+ - audits/**
+ - ci/buildserver-*
+ - ci/ci-*
+ - dist-assets/**
+ - docs/**
+ - graphics/**
+ - gui/**
+ - ios/**
+ - mullvad-jni/**
+ - scripts/**
+ - '.*ignore'
+ - .editorconfig
+ - .gitattributes
+ - .travis.yml
+ - Dockerfile
+ - build.sh
+ - build-apk.sh
+ - integration-tests.sh
+ - prepare-release.sh
+ - rustfmt.toml
+ - update-api-address.sh
+ - update-relays.sh
+ - version-metadata.sh
+ # Build if requested manually from the Actions tab
+ workflow_dispatch:
+jobs:
+ build:
+ strategy:
+ matrix:
+ rust: [stable, beta, nightly]
+
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Checkout binaries submodule
+ run: git submodule update --init --depth=1 dist-assets/binaries
+
+ - name: Install Rust
+ uses: ATiltedTree/setup-rust@v1.0.4
+ with:
+ rust-version: ${{ matrix.rust }}
+
+ - name: Install Go
+ uses: actions/setup-go@v2.1.3
+ with:
+ go-version: 1.16
+
+ - name: Install build dependencies
+ run: sudo apt-get install libdbus-1-dev
+
+ - name: Build and test crates
+ run: ./ci/check-rust.sh
diff --git a/ci/check-rust.sh b/ci/check-rust.sh
new file mode 100755
index 0000000000..4862bc84dd
--- /dev/null
+++ b/ci/check-rust.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+set -eux
+
+export RUSTFLAGS="--deny warnings"
+
+# Build WireGuard Go
+./wireguard/build-wireguard-go.sh
+
+# Build Windows modules
+case "$(uname -s)" in
+ MINGW*|MSYS_NT*)
+ time ./build_windows_modules.sh --dev-build
+ ;;
+esac
+
+# Build Rust crates
+source env.sh
+time cargo build --locked --verbose
+
+# Test Rust crates
+time cargo test --locked --verbose