Skip to content

Commit

Permalink
🔧 [github/actions] Enable CI for clang/gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
kris-jusiak committed Sep 5, 2022
1 parent 4923e56 commit 8499199
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/actions/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM krisjusiak/dev:latest
COPY build.sh /build.sh
ENTRYPOINT ["sh", "/build.sh"]
10 changes: 10 additions & 0 deletions .github/workflows/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: 'build'
inputs:
CXX:
description: 'compiler'
required: true
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.CXX }}
10 changes: 10 additions & 0 deletions .github/workflows/actions/build/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!bin/sh

cd /github/home/mp
git submodule update --init

mkdir build-$1
cd build-$1
CXX=$1 cmake .. -DBOOST_MP_BUILD_TESTS=ON -DBOOST_MP_BUILD_EXAMPLES=ON
make -j8
ctest --output-on-failure
32 changes: 11 additions & 21 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,19 @@ on:
- main
- develop

env:
CTEST_OUTPUT_ON_FAILURE: 1
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules

jobs:
build:
runs-on: ubuntu-latest

name: build
steps:
- uses: actions/checkout@v2

- uses: actions/cache@v2
- uses: actions/checkout@v1
with:
path: "**/cpm_modules"
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}

- name: configure
run: cmake -S . -B build

- name: build
run: cmake --build build -j

- name: test
run: |
cd build
ctest
submodules: true
- uses: ./.github/workflows/actions/build
name: clang
with:
CXX: clang++-16
- uses: ./.github/workflows/actions/build
name: gcc
with:
CXX: g++-12
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "vendor/ut"]
path = vendor/ut
url = git@github.com:boost-ext/ut.git
url = https://github.com/boost-ext/ut.git

0 comments on commit 8499199

Please sign in to comment.