Skip to content

Commit f7573ca

Browse files
committed
Add posix-standalone-cmake-test to GHA
1 parent 93c298e commit f7573ca

File tree

1 file changed

+60
-12
lines changed

1 file changed

+60
-12
lines changed

.github/workflows/ci.yml

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ jobs:
7878
steps:
7979
- uses: actions/checkout@v4
8080

81-
- name: Install packages
82-
if: matrix.install
83-
run: sudo apt install ${{matrix.install}}
84-
8581
- name: Setup Boost
8682
run: |
8783
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
@@ -123,10 +119,6 @@ jobs:
123119
steps:
124120
- uses: actions/checkout@v4
125121

126-
- name: Install packages
127-
if: matrix.install
128-
run: sudo apt install ${{matrix.install}}
129-
130122
- name: Setup Boost
131123
run: |
132124
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
@@ -178,10 +170,6 @@ jobs:
178170
steps:
179171
- uses: actions/checkout@v4
180172

181-
- name: Install packages
182-
if: matrix.install
183-
run: sudo apt install ${{matrix.install}}
184-
185173
- name: Setup Boost
186174
run: |
187175
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
@@ -217,3 +205,63 @@ jobs:
217205
run: |
218206
cd ../boost-root/__build__
219207
ctest --output-on-failure --no-tests=error
208+
209+
posix-standalone-cmake-test:
210+
strategy:
211+
fail-fast: false
212+
matrix:
213+
include:
214+
- os: ubuntu-latest
215+
- os: macos-latest
216+
217+
runs-on: ${{matrix.os}}
218+
219+
steps:
220+
- uses: actions/checkout@v4
221+
222+
- name: Setup Boost
223+
run: |
224+
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
225+
LIBRARY=${GITHUB_REPOSITORY#*/}
226+
echo LIBRARY: $LIBRARY
227+
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
228+
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
229+
echo GITHUB_REF: $GITHUB_REF
230+
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
231+
REF=${REF#refs/heads/}
232+
echo REF: $REF
233+
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
234+
echo BOOST_BRANCH: $BOOST_BRANCH
235+
cd ..
236+
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
237+
cd boost-root
238+
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
239+
git submodule update --init tools/boostdep
240+
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
241+
242+
- name: Configure Boost
243+
run: |
244+
cd ../boost-root
245+
mkdir __build__ && cd __build__
246+
cmake -DCMAKE_INSTALL_PREFIX=~/.local ..
247+
248+
- name: Install Boost
249+
run: |
250+
cd ../boost-root/__build__
251+
cmake --build . --target install
252+
253+
- name: Configure
254+
run: |
255+
mkdir __build__
256+
cd __build__
257+
cmake -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX=~/.local ..
258+
259+
- name: Build tests
260+
run: |
261+
cd __build__
262+
cmake --build . --target tests
263+
264+
- name: Run tests
265+
run: |
266+
cd __build__
267+
ctest --output-on-failure --no-tests=error

0 commit comments

Comments
 (0)