summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/daemon.yml
blob: 49c983c2592323a5144d8f180f3e58dcf64de765 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
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/frontend.yml
            - .github/workflows/ios.yml
            - .github/workflows/rustfmt.yml
            - .github/workflows/translations.yml
            - android/**
            - audits/**
            - ci/buildserver-*
            - ci/ci-*
            - dist-assets/**
            - docs/**
            - graphics/**
            - gui/**
            - ios/**
            - mullvad-jni/**
            - scripts/**
            - '.*ignore'
            - .editorconfig
            - .gitattributes
            - 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-linux:
        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

    build-macos:
        runs-on: macos-latest
        steps:
            - name: Checkout repository
              uses: actions/checkout@v2

            - name: Install Rust
              uses: ATiltedTree/setup-rust@v1.0.4
              with:
                  rust-version: stable

            - name: Install Go
              uses: actions/setup-go@v2.1.3
              with:
                  go-version: 1.16

            - name: Build and test crates
              run: ./ci/check-rust.sh

    build-windows:
        runs-on: windows-latest
        steps:
            - name: Checkout repository
              uses: actions/checkout@v2

            - name: Checkout submodules
              run: git submodule update --init --depth=1

            - name: Install Rust
              uses: ATiltedTree/setup-rust@v1.0.4
              with:
                  rust-version: stable

            - name: Install Go
              uses: actions/setup-go@v2.1.3
              with:
                  go-version: 1.16

            - name: Install msbuild
              uses: microsoft/setup-msbuild@v1.0.2
              with:
                  vs-version: 16

            - name: Build and test crates
              shell: bash
              run: ./ci/check-rust.sh