diff --git a/.github/workflows/actions/build/Dockerfile b/.github/workflows/actions/build/Dockerfile new file mode 100644 index 0000000..b5cb46c --- /dev/null +++ b/.github/workflows/actions/build/Dockerfile @@ -0,0 +1,3 @@ +FROM krisjusiak/dev:latest +COPY build.sh /build.sh +ENTRYPOINT ["sh", "/build.sh"] diff --git a/.github/workflows/actions/build/action.yml b/.github/workflows/actions/build/action.yml new file mode 100644 index 0000000..399caeb --- /dev/null +++ b/.github/workflows/actions/build/action.yml @@ -0,0 +1,10 @@ +name: 'build' +inputs: + CXX: + description: 'compiler' + required: true +runs: + using: 'docker' + image: 'Dockerfile' + args: + - ${{ inputs.CXX }} diff --git a/.github/workflows/actions/build/build.sh b/.github/workflows/actions/build/build.sh new file mode 100755 index 0000000..c1d0e4f --- /dev/null +++ b/.github/workflows/actions/build/build.sh @@ -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 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5236ff1..9efaeaa 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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 diff --git a/.gitmodules b/.gitmodules index f14cd9a..04ff125 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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