Kenton Varda | 7a70959 | 2020-04-10 19:47:56 -0500 | [diff] [blame] | 1 | name: Quick Tests |
| 2 | |
| 3 | on: |
| 4 | pull_request: |
| 5 | paths-ignore: |
| 6 | - 'doc/**' |
Kenton Varda | a3fefd1 | 2020-04-16 13:20:12 -0500 | [diff] [blame] | 7 | push: |
| 8 | branches: |
Kenton Varda | 538459f | 2020-04-22 10:28:33 -0500 | [diff] [blame] | 9 | - master |
Kenton Varda | a3fefd1 | 2020-04-16 13:20:12 -0500 | [diff] [blame] | 10 | - 'release-*' |
Kenton Varda | 7a70959 | 2020-04-10 19:47:56 -0500 | [diff] [blame] | 11 | |
| 12 | jobs: |
Jonas Vautherin | 77ac915 | 2022-01-14 00:14:26 +0100 | [diff] [blame] | 13 | Linux-musl: |
| 14 | runs-on: ubuntu-latest |
| 15 | container: alpine:latest |
| 16 | steps: |
| 17 | - uses: actions/checkout@v2 |
| 18 | - name: install dependencies |
| 19 | run: apk add autoconf automake build-base cmake libtool libucontext-dev linux-headers openssl-dev |
| 20 | - name: super-test |
| 21 | run: ./super-test.sh quick |
Kenton Varda | 7a70959 | 2020-04-10 19:47:56 -0500 | [diff] [blame] | 22 | Linux: |
Kenton Varda | ba54c26 | 2021-07-23 12:17:24 -0500 | [diff] [blame] | 23 | runs-on: ubuntu-latest |
Kenton Varda | 7a70959 | 2020-04-10 19:47:56 -0500 | [diff] [blame] | 24 | strategy: |
| 25 | fail-fast: false |
| 26 | matrix: |
Kenton Varda | ba54c26 | 2021-07-23 12:17:24 -0500 | [diff] [blame] | 27 | compiler: [g++-7, g++-10, clang-6.0, clang-10] |
Kenton Varda | 7a70959 | 2020-04-10 19:47:56 -0500 | [diff] [blame] | 28 | steps: |
| 29 | - uses: actions/checkout@v2 |
| 30 | - name: install dependencies |
| 31 | run: | |
| 32 | export DEBIAN_FRONTEND=noninteractive |
| 33 | sudo apt-get install -y build-essential git zlib1g-dev cmake libssl-dev ${{ matrix.compiler }} |
| 34 | - name: super-test |
| 35 | run: | |
| 36 | ./super-test.sh quick ${{ matrix.compiler }} |
Vitali Lovich | 72263ff | 2021-05-12 12:23:19 -0700 | [diff] [blame] | 37 | Linux-lock-tracking: |
Kenton Varda | ba54c26 | 2021-07-23 12:17:24 -0500 | [diff] [blame] | 38 | runs-on: ubuntu-latest |
Vitali Lovich | 72263ff | 2021-05-12 12:23:19 -0700 | [diff] [blame] | 39 | strategy: |
| 40 | fail-fast: false |
| 41 | matrix: |
| 42 | compiler: [clang-9] |
Vitali Lovich | fd66470 | 2021-07-26 11:21:35 -0700 | [diff] [blame] | 43 | features: ["-DKJ_TRACK_LOCK_BLOCKING=1 -DKJ_SAVE_ACQUIRED_LOCK_INFO=1 -DKJ_CONTENTION_WARNING_THRESHOLD=200"] |
Vitali Lovich | 72263ff | 2021-05-12 12:23:19 -0700 | [diff] [blame] | 44 | steps: |
| 45 | - uses: actions/checkout@v2 |
| 46 | - name: install dependencies |
| 47 | run: | |
| 48 | export DEBIAN_FRONTEND=noninteractive |
| 49 | sudo apt-get install -y build-essential git zlib1g-dev cmake libssl-dev ${{ matrix.compiler }} |
| 50 | - name: super-test |
| 51 | run: | |
| 52 | # librt is used for timer_create in the unit tests for lock tracking (mutex-test.c++). |
| 53 | ./super-test.sh quick ${{ matrix.compiler }} cpp-features "${{matrix.features}}" extra-libs "-lrt" |
Jonah Beckford | 9e59856 | 2022-02-10 12:57:19 -0800 | [diff] [blame] | 54 | ManyLinux: |
| 55 | runs-on: ubuntu-latest |
| 56 | strategy: |
| 57 | fail-fast: false |
| 58 | matrix: |
| 59 | include: |
| 60 | - cross-compiler: manylinux2014-x64 |
| 61 | - cross-compiler: manylinux2014-x86 |
| 62 | docker-run-args: --platform linux/386 |
| 63 | steps: |
| 64 | - uses: actions/checkout@v2 |
| 65 | - name: install dockcross |
| 66 | run: | |
| 67 | docker run ${{ matrix.docker-run-args }} --rm dockcross/${{ matrix.cross-compiler }} > ./dockcross |
| 68 | chmod +x ./dockcross |
| 69 | - name: super-test |
| 70 | run: | |
| 71 | ./dockcross ./super-test.sh quick g++ |
Kenton Varda | 7a70959 | 2020-04-10 19:47:56 -0500 | [diff] [blame] | 72 | MacOS: |
| 73 | runs-on: macos-latest |
| 74 | strategy: |
| 75 | fail-fast: false |
| 76 | steps: |
| 77 | - uses: actions/checkout@v2 |
| 78 | - name: install dependencies |
| 79 | run: | |
| 80 | brew install autoconf automake libtool pkg-config |
| 81 | - name: super-test |
| 82 | run: | |
| 83 | ./super-test.sh quick |
| 84 | MSVC: |
| 85 | runs-on: ${{ matrix.os }} |
| 86 | strategy: |
| 87 | fail-fast: false |
| 88 | matrix: |
| 89 | os: ['windows-2016', 'windows-latest'] |
| 90 | include: |
| 91 | - os: windows-2016 |
Indy Ray | d4a3770 | 2021-04-10 17:04:23 -0700 | [diff] [blame] | 92 | target: 'Visual Studio 15 2017' |
| 93 | arch: -A x64 |
Kenton Varda | 7a70959 | 2020-04-10 19:47:56 -0500 | [diff] [blame] | 94 | - os: windows-latest |
Kenton Varda | f40e735 | 2020-05-01 17:30:40 -0500 | [diff] [blame] | 95 | target: 'Visual Studio 16 2019' |
Kenton Varda | 931327f | 2020-05-11 18:11:06 -0500 | [diff] [blame] | 96 | arch: -A x64 |
Kenton Varda | 7a70959 | 2020-04-10 19:47:56 -0500 | [diff] [blame] | 97 | steps: |
| 98 | - uses: actions/checkout@v2 |
Guillaume Papin | 62726a0 | 2020-04-30 21:52:22 +0200 | [diff] [blame] | 99 | - name: Include $CONDA in $PATH |
| 100 | run: | |
Kenton Varda | a202a1e | 2020-11-19 18:17:54 -0600 | [diff] [blame] | 101 | echo "$Env:CONDA\condabin" >> $env:GITHUB_PATH |
Guillaume Papin | 62726a0 | 2020-04-30 21:52:22 +0200 | [diff] [blame] | 102 | - name: Install dependencies via Conda |
| 103 | run: | |
| 104 | conda update -n base -c defaults -q conda |
Kenton Varda | 931327f | 2020-05-11 18:11:06 -0500 | [diff] [blame] | 105 | conda install -n base -c defaults -q ninja openssl zlib |
Kenton Varda | 7a70959 | 2020-04-10 19:47:56 -0500 | [diff] [blame] | 106 | - name: Build and test |
| 107 | shell: cmd |
| 108 | run: | |
Guillaume Papin | 62726a0 | 2020-04-30 21:52:22 +0200 | [diff] [blame] | 109 | echo "Activate conda base environment" |
| 110 | call activate base |
Kenton Varda | 7a70959 | 2020-04-10 19:47:56 -0500 | [diff] [blame] | 111 | echo "Building Cap'n Proto with ${{ matrix.target }}" |
Kenton Varda | 931327f | 2020-05-11 18:11:06 -0500 | [diff] [blame] | 112 | 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 |
Kenton Varda | f40e735 | 2020-05-01 17:30:40 -0500 | [diff] [blame] | 113 | cmake --build build-output --config debug --target install |
Kenton Varda | 7a70959 | 2020-04-10 19:47:56 -0500 | [diff] [blame] | 114 | |
| 115 | echo "Building Cap'n Proto samples with ${{ matrix.target }}" |
Kenton Varda | 931327f | 2020-05-11 18:11:06 -0500 | [diff] [blame] | 116 | cmake -Hc++/samples -Bbuild-output-samples ${{ matrix.arch }} -G "${{ matrix.target }}" -DCMAKE_BUILD_TYPE=debug -DCMAKE_PREFIX_PATH=%CD%\capnproto-c++-install |
Kenton Varda | f40e735 | 2020-05-01 17:30:40 -0500 | [diff] [blame] | 117 | cmake --build build-output-samples --config debug |
Kenton Varda | 7a70959 | 2020-04-10 19:47:56 -0500 | [diff] [blame] | 118 | |
| 119 | cd build-output\src |
| 120 | ctest -V -C debug |
| 121 | MinGW: |
| 122 | runs-on: windows-latest |
| 123 | strategy: |
| 124 | fail-fast: false |
| 125 | steps: |
| 126 | - uses: actions/checkout@v2 |
| 127 | - name: Build and test |
| 128 | shell: cmd |
| 129 | run: | |
Kenton Varda | 728abdf | 2020-06-21 15:14:35 -0500 | [diff] [blame] | 130 | echo "Deleting broken Postgres install until https://github.com/actions/virtual-environments/issues/1089 is fixed..." |
| 131 | rmdir /s /q C:\PROGRA~1\POSTGR~1 |
| 132 | |
Kenton Varda | 7a70959 | 2020-04-10 19:47:56 -0500 | [diff] [blame] | 133 | echo "Building Cap'n Proto with MinGW" |
| 134 | cmake -Hc++ -Bbuild-output -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=%CD%\capnproto-c++-install -DCMAKE_SH="CMAKE_SH-NOTFOUND" |
| 135 | cmake --build build-output --target install -- -j2 |
| 136 | |
| 137 | echo "Building Cap'n Proto samples with MinGW" |
| 138 | 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" |
| 139 | cmake --build build-output-samples |
| 140 | |
| 141 | cd build-output\src |
| 142 | ctest -V -C debug |
Kenton Varda | c7c55b5 | 2021-12-06 13:13:02 -0600 | [diff] [blame] | 143 | # Cygwin: |
| 144 | # runs-on: windows-latest |
| 145 | # strategy: |
| 146 | # fail-fast: false |
| 147 | # steps: |
| 148 | # - run: git config --global core.autocrlf false |
| 149 | # - uses: actions/checkout@v2 |
| 150 | # # TODO(someday): If we could cache the Cygwin installation we wouldn't have to spend three |
| 151 | # # minutes installing it for every build. Unfortuntaley, actions/cache@v1 does not preserve |
| 152 | # # DOS file attributes, which corrupts the Cygwin install. In particular, Cygwin marks |
| 153 | # # symlinks with the "DOS SYSTEM" attribute. We could cache just the downloaded packages, |
| 154 | # # but it turns out that only saves a couple seconds; most of the time is spend unpacking. |
| 155 | # - name: Install Cygwin |
| 156 | # run: | |
| 157 | # choco config get cacheLocation |
| 158 | # choco install --no-progress cygwin |
| 159 | # - name: Install Cygwin additional packages |
| 160 | # shell: cmd |
| 161 | # run: | |
| 162 | # 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 |
| 163 | # - name: Build and test |
| 164 | # shell: cmd |
| 165 | # run: | |
| 166 | # C:\tools\cygwin\bin\bash -lc 'export PATH=/usr/local/bin:/usr/bin:/bin; cd /cygdrive/d/a/capnproto/capnproto; ./super-test.sh quick' |