Welcome to mirror list, hosted at ThFree Co, Russian Federation.

build.yml « workflows « .github - github.com/SoftEtherVPN/libhamcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3d7502918c5127ba5843da9dba8db0729e35fadb (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
on: [push, pull_request]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    steps:
    - uses: actions/cache@v2
      if: runner.os == 'Windows'
      with:
          key: 'vcpkg-${{matrix.os}}'
          path: 'C:/vcpkg/installed'

    - uses: knicknic/os-specific-run@v1.0.3
      name: Install dependencies
      with:
        linux: sudo apt-get -y install ninja-build zlib1g-dev
        macos: brew install ninja zlib
        windows: vcpkg install zlib --triplet x64-windows-static-md

    - uses: actions/checkout@v2
      with:
        submodules: 'recursive'

    # Workaround for https://github.com/KnicKnic/os-specific-run/issues/9
    - name: Build
      run: |
        if [ "$RUNNER_OS" == "Linux" ] || [ "$RUNNER_OS" == "macOS" ]; then
          mkdir ${{runner.workspace}}/build && cd ${{runner.workspace}}/build
          cmake -G Ninja ${{github.workspace}}
          cmake --build .
        elif [ "$RUNNER_OS" == "Windows" ]; then
          $COMSPEC /c ${GITHUB_WORKSPACE}/.github/workflows/windows_build.bat
        fi
      shell: bash