|
| 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-musl: |
| 14 | + runs-on: ubuntu-20.04 |
| 15 | + container: alpine:3.16.3 |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v2 |
| 18 | + - name: install dependencies |
| 19 | + run: apk add autoconf automake bash build-base cmake libtool libucontext-dev linux-headers openssl-dev |
| 20 | + - name: super-test |
| 21 | + run: ./super-test.sh quick |
| 22 | + Linux-old: |
| 23 | + runs-on: ubuntu-20.04 |
| 24 | + strategy: |
| 25 | + fail-fast: false |
| 26 | + matrix: |
| 27 | + compiler: [g++-7, clang-6.0] |
| 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 }} |
| 37 | + Linux: |
| 38 | + runs-on: ubuntu-latest |
| 39 | + strategy: |
| 40 | + fail-fast: false |
| 41 | + matrix: |
| 42 | + compiler: [g++-12, clang-14] |
| 43 | + steps: |
| 44 | + - uses: actions/checkout@v2 |
| 45 | + - name: install dependencies |
| 46 | + run: | |
| 47 | + export DEBIAN_FRONTEND=noninteractive |
| 48 | + sudo apt-get install -y build-essential git zlib1g-dev cmake libssl-dev ${{ matrix.compiler }} |
| 49 | + - name: super-test |
| 50 | + run: | |
| 51 | + ./super-test.sh quick ${{ matrix.compiler }} |
| 52 | + Linux-lock-tracking: |
| 53 | + runs-on: ubuntu-20.04 |
| 54 | + strategy: |
| 55 | + fail-fast: false |
| 56 | + matrix: |
| 57 | + compiler: [clang-9] |
| 58 | + features: ["-DKJ_TRACK_LOCK_BLOCKING=1 -DKJ_SAVE_ACQUIRED_LOCK_INFO=1 -DKJ_CONTENTION_WARNING_THRESHOLD=200"] |
| 59 | + steps: |
| 60 | + - uses: actions/checkout@v2 |
| 61 | + - name: install dependencies |
| 62 | + run: | |
| 63 | + export DEBIAN_FRONTEND=noninteractive |
| 64 | + sudo apt-get install -y build-essential git zlib1g-dev cmake libssl-dev ${{ matrix.compiler }} |
| 65 | + - name: super-test |
| 66 | + run: | |
| 67 | + # librt is used for timer_create in the unit tests for lock tracking (mutex-test.c++). |
| 68 | + ./super-test.sh quick ${{ matrix.compiler }} cpp-features "${{matrix.features}}" extra-libs "-lrt" |
| 69 | + ManyLinux: |
| 70 | + runs-on: ubuntu-20.04 |
| 71 | + strategy: |
| 72 | + fail-fast: false |
| 73 | + matrix: |
| 74 | + include: |
| 75 | + - cross-compiler: manylinux2014-x64 |
| 76 | + - cross-compiler: manylinux2014-x86 |
| 77 | + docker-run-args: --platform linux/386 |
| 78 | + steps: |
| 79 | + - uses: actions/checkout@v2 |
| 80 | + - name: install dockcross |
| 81 | + run: | |
| 82 | + docker run ${{ matrix.docker-run-args }} --rm dockcross/${{ matrix.cross-compiler }} > ./dockcross |
| 83 | + chmod +x ./dockcross |
| 84 | + - name: super-test |
| 85 | + run: | |
| 86 | + ./dockcross ./super-test.sh quick g++ |
| 87 | + MacOS: |
| 88 | + runs-on: macos-latest |
| 89 | + strategy: |
| 90 | + fail-fast: false |
| 91 | + steps: |
| 92 | + - uses: actions/checkout@v2 |
| 93 | + - name: install dependencies |
| 94 | + run: | |
| 95 | + brew install autoconf automake libtool pkg-config |
| 96 | + - name: super-test |
| 97 | + run: | |
| 98 | + ./super-test.sh quick |
| 99 | + MSVC: |
| 100 | + runs-on: ${{ matrix.os }} |
| 101 | + strategy: |
| 102 | + fail-fast: false |
| 103 | + matrix: |
| 104 | + os: ['windows-2019', 'windows-latest'] |
| 105 | + include: |
| 106 | + - os: windows-2019 |
| 107 | + target: 'Visual Studio 16 2019' |
| 108 | + arch: -A x64 |
| 109 | + - os: windows-latest |
| 110 | + target: 'Visual Studio 17 2022' |
| 111 | + arch: -A x64 |
| 112 | + steps: |
| 113 | + - uses: actions/checkout@v2 |
| 114 | + - name: Include $CONDA in $PATH |
| 115 | + run: | |
| 116 | + echo "$Env:CONDA\condabin" >> $env:GITHUB_PATH |
| 117 | + - name: Install dependencies via Conda |
| 118 | + run: | |
| 119 | + conda update -n base -c defaults -q conda |
| 120 | + conda install -n base -c defaults -q ninja openssl zlib |
| 121 | + - name: Build and test |
| 122 | + shell: cmd |
| 123 | + run: | |
| 124 | + echo "Activate conda base environment" |
| 125 | + call activate base |
| 126 | + echo "Building Cap'n Proto with ${{ matrix.target }}" |
| 127 | + 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 |
| 128 | + cmake --build build-output --config debug --target install |
| 129 | +
|
| 130 | + echo "Building Cap'n Proto samples with ${{ matrix.target }}" |
| 131 | + cmake -Hc++/samples -Bbuild-output-samples ${{ matrix.arch }} -G "${{ matrix.target }}" -DCMAKE_BUILD_TYPE=debug -DCMAKE_PREFIX_PATH=%CD%\capnproto-c++-install |
| 132 | + cmake --build build-output-samples --config debug |
| 133 | +
|
| 134 | + cd build-output\src |
| 135 | + ctest -V -C debug |
| 136 | + MinGW: |
| 137 | + runs-on: windows-latest |
| 138 | + strategy: |
| 139 | + fail-fast: false |
| 140 | + steps: |
| 141 | + - uses: actions/checkout@v2 |
| 142 | + - name: Build and test |
| 143 | + shell: cmd |
| 144 | + run: | |
| 145 | + echo "Deleting broken Postgres install until https://github.com/actions/virtual-environments/issues/1089 is fixed..." |
| 146 | + rmdir /s /q C:\PROGRA~1\POSTGR~1 |
| 147 | +
|
| 148 | + echo "Building Cap'n Proto with MinGW" |
| 149 | + cmake -Hc++ -Bbuild-output -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=%CD%\capnproto-c++-install -DCMAKE_SH="CMAKE_SH-NOTFOUND" -DCMAKE_CXX_STANDARD_LIBRARIES="-static-libgcc -static-libstdc++" |
| 150 | + cmake --build build-output --target install -- -j2 |
| 151 | +
|
| 152 | + echo "Building Cap'n Proto samples with MinGW" |
| 153 | + 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" |
| 154 | + cmake --build build-output-samples |
| 155 | +
|
| 156 | + cd build-output\src |
| 157 | + ctest -V -C debug |
| 158 | + # Cygwin: |
| 159 | + # runs-on: windows-latest |
| 160 | + # strategy: |
| 161 | + # fail-fast: false |
| 162 | + # steps: |
| 163 | + # - run: git config --global core.autocrlf false |
| 164 | + # - uses: actions/checkout@v2 |
| 165 | + # # TODO(someday): If we could cache the Cygwin installation we wouldn't have to spend three |
| 166 | + # # minutes installing it for every build. Unfortuntaley, actions/cache@v1 does not preserve |
| 167 | + # # DOS file attributes, which corrupts the Cygwin install. In particular, Cygwin marks |
| 168 | + # # symlinks with the "DOS SYSTEM" attribute. We could cache just the downloaded packages, |
| 169 | + # # but it turns out that only saves a couple seconds; most of the time is spend unpacking. |
| 170 | + # - name: Install Cygwin |
| 171 | + # run: | |
| 172 | + # choco config get cacheLocation |
| 173 | + # choco install --no-progress cygwin |
| 174 | + # - name: Install Cygwin additional packages |
| 175 | + # shell: cmd |
| 176 | + # run: | |
| 177 | + # 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 |
| 178 | + # - name: Build and test |
| 179 | + # shell: cmd |
| 180 | + # run: | |
| 181 | + # C:\tools\cygwin\bin\bash -lc 'export PATH=/usr/local/bin:/usr/bin:/bin; cd /cygdrive/d/a/capnproto/capnproto; ./super-test.sh quick' |
| 182 | + Linux-bazel-clang: |
| 183 | + runs-on: ubuntu-20.04 |
| 184 | + strategy: |
| 185 | + fail-fast: false |
| 186 | + matrix: |
| 187 | + clang_version: [16] |
| 188 | + steps: |
| 189 | + - uses: actions/checkout@v3 |
| 190 | + - uses: bazelbuild/setup-bazelisk@v2 |
| 191 | + - name: install dependencies |
| 192 | + run: | |
| 193 | + export DEBIAN_FRONTEND=noninteractive |
| 194 | + sudo apt-get install -y build-essential git |
| 195 | + # todo: replace with apt-get when clang-16 is part of ubuntu lts |
| 196 | + - name: install clang |
| 197 | + uses: egor-tensin/setup-clang@v1 |
| 198 | + with: |
| 199 | + version: ${{ matrix.clang_version }} |
| 200 | + - name: super-test |
| 201 | + run: | |
| 202 | + cd c++ |
| 203 | + bazel test --verbose_failures --test_output=errors //... |
0 commit comments