blob: 297a626a8d2c083e392fa22876017263e186b8cc [file] [log] [blame]
Kenton Varda7a709592020-04-10 19:47:56 -05001name: Quick Tests
2
3on:
4 pull_request:
5 paths-ignore:
6 - 'doc/**'
Kenton Vardaa3fefd12020-04-16 13:20:12 -05007 push:
8 branches:
Kenton Varda538459f2020-04-22 10:28:33 -05009 - master
Kenton Vardaa3fefd12020-04-16 13:20:12 -050010 - 'release-*'
Kenton Varda7a709592020-04-10 19:47:56 -050011
12jobs:
Jonas Vautherin77ac9152022-01-14 00:14:26 +010013 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 Varda7a709592020-04-10 19:47:56 -050022 Linux:
Kenton Vardaba54c262021-07-23 12:17:24 -050023 runs-on: ubuntu-latest
Kenton Varda7a709592020-04-10 19:47:56 -050024 strategy:
25 fail-fast: false
26 matrix:
Kenton Vardaba54c262021-07-23 12:17:24 -050027 compiler: [g++-7, g++-10, clang-6.0, clang-10]
Kenton Varda7a709592020-04-10 19:47:56 -050028 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 Lovich72263ff2021-05-12 12:23:19 -070037 Linux-lock-tracking:
Kenton Vardaba54c262021-07-23 12:17:24 -050038 runs-on: ubuntu-latest
Vitali Lovich72263ff2021-05-12 12:23:19 -070039 strategy:
40 fail-fast: false
41 matrix:
42 compiler: [clang-9]
Vitali Lovichfd664702021-07-26 11:21:35 -070043 features: ["-DKJ_TRACK_LOCK_BLOCKING=1 -DKJ_SAVE_ACQUIRED_LOCK_INFO=1 -DKJ_CONTENTION_WARNING_THRESHOLD=200"]
Vitali Lovich72263ff2021-05-12 12:23:19 -070044 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 Beckford9e598562022-02-10 12:57:19 -080054 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 Varda7a709592020-04-10 19:47:56 -050072 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 Rayd4a37702021-04-10 17:04:23 -070092 target: 'Visual Studio 15 2017'
93 arch: -A x64
Kenton Varda7a709592020-04-10 19:47:56 -050094 - os: windows-latest
Kenton Vardaf40e7352020-05-01 17:30:40 -050095 target: 'Visual Studio 16 2019'
Kenton Varda931327f2020-05-11 18:11:06 -050096 arch: -A x64
Kenton Varda7a709592020-04-10 19:47:56 -050097 steps:
98 - uses: actions/checkout@v2
Guillaume Papin62726a02020-04-30 21:52:22 +020099 - name: Include $CONDA in $PATH
100 run: |
Kenton Vardaa202a1e2020-11-19 18:17:54 -0600101 echo "$Env:CONDA\condabin" >> $env:GITHUB_PATH
Guillaume Papin62726a02020-04-30 21:52:22 +0200102 - name: Install dependencies via Conda
103 run: |
104 conda update -n base -c defaults -q conda
Kenton Varda931327f2020-05-11 18:11:06 -0500105 conda install -n base -c defaults -q ninja openssl zlib
Kenton Varda7a709592020-04-10 19:47:56 -0500106 - name: Build and test
107 shell: cmd
108 run: |
Guillaume Papin62726a02020-04-30 21:52:22 +0200109 echo "Activate conda base environment"
110 call activate base
Kenton Varda7a709592020-04-10 19:47:56 -0500111 echo "Building Cap'n Proto with ${{ matrix.target }}"
Kenton Varda931327f2020-05-11 18:11:06 -0500112 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 Vardaf40e7352020-05-01 17:30:40 -0500113 cmake --build build-output --config debug --target install
Kenton Varda7a709592020-04-10 19:47:56 -0500114
115 echo "Building Cap'n Proto samples with ${{ matrix.target }}"
Kenton Varda931327f2020-05-11 18:11:06 -0500116 cmake -Hc++/samples -Bbuild-output-samples ${{ matrix.arch }} -G "${{ matrix.target }}" -DCMAKE_BUILD_TYPE=debug -DCMAKE_PREFIX_PATH=%CD%\capnproto-c++-install
Kenton Vardaf40e7352020-05-01 17:30:40 -0500117 cmake --build build-output-samples --config debug
Kenton Varda7a709592020-04-10 19:47:56 -0500118
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 Varda728abdf2020-06-21 15:14:35 -0500130 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 Varda7a709592020-04-10 19:47:56 -0500133 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 Vardac7c55b52021-12-06 13:13:02 -0600143 # 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'