|
| 1 | +name: Quick Tests |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths-ignore: |
| 6 | + - 'doc/**' |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - master |
| 10 | + - 'release-*' |
| 11 | + |
| 12 | +jobs: |
| 13 | + Linux: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + strategy: |
| 16 | + fail-fast: false |
| 17 | + matrix: |
| 18 | + compiler: [g++-7, g++-10, clang-6.0, clang-10] |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v2 |
| 21 | + - name: install dependencies |
| 22 | + run: | |
| 23 | + export DEBIAN_FRONTEND=noninteractive |
| 24 | + sudo apt-get install -y build-essential git zlib1g-dev cmake libssl-dev ${{ matrix.compiler }} |
| 25 | + - name: super-test |
| 26 | + run: | |
| 27 | + ./super-test.sh quick ${{ matrix.compiler }} |
| 28 | + Linux-lock-tracking: |
| 29 | + runs-on: ubuntu-latest |
| 30 | + strategy: |
| 31 | + fail-fast: false |
| 32 | + matrix: |
| 33 | + compiler: [clang-9] |
| 34 | + features: ["-DKJ_TRACK_LOCK_BLOCKING=1 -DKJ_SAVE_ACQUIRED_LOCK_INFO=1 -DKJ_CONTENTION_WARNING_THRESHOLD=200"] |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@v2 |
| 37 | + - name: install dependencies |
| 38 | + run: | |
| 39 | + export DEBIAN_FRONTEND=noninteractive |
| 40 | + sudo apt-get install -y build-essential git zlib1g-dev cmake libssl-dev ${{ matrix.compiler }} |
| 41 | + - name: super-test |
| 42 | + run: | |
| 43 | + # librt is used for timer_create in the unit tests for lock tracking (mutex-test.c++). |
| 44 | + ./super-test.sh quick ${{ matrix.compiler }} cpp-features "${{matrix.features}}" extra-libs "-lrt" |
| 45 | + MacOS: |
| 46 | + runs-on: macos-latest |
| 47 | + strategy: |
| 48 | + fail-fast: false |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v2 |
| 51 | + - name: install dependencies |
| 52 | + run: | |
| 53 | + brew install autoconf automake libtool pkg-config |
| 54 | + - name: super-test |
| 55 | + run: | |
| 56 | + ./super-test.sh quick |
| 57 | + MSVC: |
| 58 | + runs-on: ${{ matrix.os }} |
| 59 | + strategy: |
| 60 | + fail-fast: false |
| 61 | + matrix: |
| 62 | + os: ['windows-2016', 'windows-latest'] |
| 63 | + include: |
| 64 | + - os: windows-2016 |
| 65 | + target: 'Visual Studio 15 2017' |
| 66 | + arch: -A x64 |
| 67 | + - os: windows-latest |
| 68 | + target: 'Visual Studio 16 2019' |
| 69 | + arch: -A x64 |
| 70 | + steps: |
| 71 | + - uses: actions/checkout@v2 |
| 72 | + - name: Include $CONDA in $PATH |
| 73 | + run: | |
| 74 | + echo "$Env:CONDA\condabin" >> $env:GITHUB_PATH |
| 75 | + - name: Install dependencies via Conda |
| 76 | + run: | |
| 77 | + conda update -n base -c defaults -q conda |
| 78 | + conda install -n base -c defaults -q ninja openssl zlib |
| 79 | + - name: Build and test |
| 80 | + shell: cmd |
| 81 | + run: | |
| 82 | + echo "Activate conda base environment" |
| 83 | + call activate base |
| 84 | + echo "Building Cap'n Proto with ${{ matrix.target }}" |
| 85 | + cmake -Hc++ -Bbuild-output ${{ matrix.arch }} -G "${{ matrix.target }}" -DCMAKE_BUILD_TYPE=debug -DCMAKE_PREFIX_PATH="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX=%CD%\capnproto-c++-install |
| 86 | + cmake --build build-output --config debug --target install |
| 87 | +
|
| 88 | + echo "Building Cap'n Proto samples with ${{ matrix.target }}" |
| 89 | + cmake -Hc++/samples -Bbuild-output-samples ${{ matrix.arch }} -G "${{ matrix.target }}" -DCMAKE_BUILD_TYPE=debug -DCMAKE_PREFIX_PATH=%CD%\capnproto-c++-install |
| 90 | + cmake --build build-output-samples --config debug |
| 91 | +
|
| 92 | + cd build-output\src |
| 93 | + ctest -V -C debug |
| 94 | + MinGW: |
| 95 | + runs-on: windows-latest |
| 96 | + strategy: |
| 97 | + fail-fast: false |
| 98 | + steps: |
| 99 | + - uses: actions/checkout@v2 |
| 100 | + - name: Build and test |
| 101 | + shell: cmd |
| 102 | + run: | |
| 103 | + echo "Deleting broken Postgres install until https://github.com/actions/virtual-environments/issues/1089 is fixed..." |
| 104 | + rmdir /s /q C:\PROGRA~1\POSTGR~1 |
| 105 | +
|
| 106 | + echo "Building Cap'n Proto with MinGW" |
| 107 | + cmake -Hc++ -Bbuild-output -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=%CD%\capnproto-c++-install -DCMAKE_SH="CMAKE_SH-NOTFOUND" |
| 108 | + cmake --build build-output --target install -- -j2 |
| 109 | +
|
| 110 | + echo "Building Cap'n Proto samples with MinGW" |
| 111 | + cmake -Hc++/samples -Bbuild-output-samples -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=debug -DCMAKE_PREFIX_PATH=%CD%\capnproto-c++-install -DCMAKE_SH="CMAKE_SH-NOTFOUND" |
| 112 | + cmake --build build-output-samples |
| 113 | +
|
| 114 | + cd build-output\src |
| 115 | + ctest -V -C debug |
| 116 | + Cygwin: |
| 117 | + runs-on: windows-latest |
| 118 | + strategy: |
| 119 | + fail-fast: false |
| 120 | + steps: |
| 121 | + - run: git config --global core.autocrlf false |
| 122 | + - uses: actions/checkout@v2 |
| 123 | + # TODO(someday): If we could cache the Cygwin installation we wouldn't have to spend three |
| 124 | + # minutes installing it for every build. Unfortuntaley, actions/cache@v1 does not preserve |
| 125 | + # DOS file attributes, which corrupts the Cygwin install. In particular, Cygwin marks |
| 126 | + # symlinks with the "DOS SYSTEM" attribute. We could cache just the downloaded packages, |
| 127 | + # but it turns out that only saves a couple seconds; most of the time is spend unpacking. |
| 128 | + - name: Install Cygwin |
| 129 | + run: | |
| 130 | + choco config get cacheLocation |
| 131 | + choco install --no-progress cygwin |
| 132 | + - name: Install Cygwin additional packages |
| 133 | + shell: cmd |
| 134 | + run: | |
| 135 | + C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -l C:/tools/cygwin/packages -s http://mirrors.kernel.org/sourceware/cygwin/ -P autoconf,automake,libtool,gcc,gcc-g++,binutils,libssl-devel,make,zlib-devel,pkg-config,cmake,xxd |
| 136 | + - name: Build and test |
| 137 | + shell: cmd |
| 138 | + run: | |
| 139 | + C:\tools\cygwin\bin\bash -lc 'export PATH=/usr/local/bin:/usr/bin:/bin; cd /cygdrive/d/a/capnproto/capnproto; ./super-test.sh quick' |
0 commit comments