Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 CI Restructuring #418

Merged
merged 6 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
key: '${{matrix.os}}-${{matrix.compiler}}-${{matrix.build_type}}'
key: '${{matrix.os}}-${{matrix.compiler}}'
variant: ccache
save: true
max-size: 10G

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.9.x'
python-version: '3.10.x'
cache: 'pip'

- name: Setup mold
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
key: '${{matrix.os}}-${{matrix.compiler}}-${{matrix.build_type}}'
key: '${{matrix.os}}-${{matrix.compiler}}'
variant: ccache
save: true
max-size: 10G

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.9.x'
python-version: '3.10.x'
cache: 'pip'

- name: Setup mold
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Test
working-directory: ${{github.workspace}}/build

run: ctest -C $BUILD_TYPE --verbose --output-on-failure --parallel 4
run: ctest -C $BUILD_TYPE --verbose --output-on-failure --repeat until-pass:3 --parallel 4

- name: Setup and run lcov
run: |
Expand Down
82 changes: 51 additions & 31 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ jobs:
build_and_test:
strategy:
matrix:
os: [ macos-12, macos-13, macos-14 ]
os: [ macos-13, macos-14 ]
compiler: [ g++-11, g++-12, g++-13, clang++ ]
build_type: [ Debug, Release ]
include:
- os: macos-12
architecture: x64
- os: macos-13
architecture: x64
- os: macos-14
Expand All @@ -60,7 +57,7 @@ jobs:
- os: macos-14
compiler: g++-13

name: ${{matrix.os}} with ${{matrix.compiler}} (${{matrix.build_type}} mode)
name: ${{matrix.os}} with ${{matrix.compiler}}
runs-on: ${{matrix.os}}

steps:
Expand All @@ -69,28 +66,19 @@ jobs:
with:
submodules: recursive

# Setup TBB for parallel STL algorithms via Homebrew (macOS 11 is no longer supported)
- if: matrix.os != 'macos-11'
name: Setup TBB
# Setup TBB for parallel STL algorithms via Homebrew
- name: Setup TBB
run: brew install tbb

# Use XCode 13.2 as a workaround because XCode 14.0 seems broken
- if: matrix.os == 'macos-12'
name: Setup XCode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "^13.2"

- if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
name: Setup XCode version
- name: Setup XCode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "^14.2"

- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
key: '${{matrix.os}}-${{matrix.compiler}}-${{matrix.build_type}}'
key: '${{matrix.os}}-${{matrix.compiler}}'
variant: ccache
save: true
max-size: 10G
Expand All @@ -105,15 +93,49 @@ jobs:
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake
working-directory: ${{github.workspace}}/build
# Build and test pipeline for Debug mode

- name: Create Build Environment (Debug)
run: cmake -E make_directory ${{github.workspace}}/build_debug

- name: Configure CMake (Debug)
working-directory: ${{github.workspace}}/build_debug
run: >
cmake ${{github.workspace}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler}}
-DCMAKE_BUILD_TYPE=Debug
-DFICTION_ENABLE_UNITY_BUILD=ON
-DFICTION_ENABLE_PCH=ON
-DFICTION_CLI=ON
-DFICTION_TEST=ON
-DFICTION_BENCHMARK=OFF
-DFICTION_EXPERIMENTS=ON
-DFICTION_Z3=ON
-DFICTION_PROGRESS_BARS=OFF
-DFICTION_WARNINGS_AS_ERRORS=OFF
-DMOCKTURTLE_EXAMPLES=OFF

- name: Build (Debug)
working-directory: ${{github.workspace}}/build_debug
run: cmake --build . --config Debug -j4 # all macOS runners provide at least 3 cores

- name: Test (Debug)
working-directory: ${{github.workspace}}/build_debug
run: ctest -C Debug --verbose --output-on-failure --repeat until-pass:3 --parallel 4


# Build and test pipeline for Release mode

- name: Create Build Environment (Release)
run: cmake -E make_directory ${{github.workspace}}/build_release

- name: Configure CMake (Release)
working-directory: ${{github.workspace}}/build_release
run: >
cmake ${{github.workspace}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler}}
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DCMAKE_BUILD_TYPE=Release
-DFICTION_ENABLE_UNITY_BUILD=ON
-DFICTION_ENABLE_PCH=ON
-DFICTION_CLI=ON
Expand All @@ -125,12 +147,10 @@ jobs:
-DFICTION_WARNINGS_AS_ERRORS=OFF
-DMOCKTURTLE_EXAMPLES=OFF

- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . -j3 # all macOS runners provide at least 3 cores
- name: Build (Release)
working-directory: ${{github.workspace}}/build_release
run: cmake --build . --config Release -j4 # all macOS runners provide at least 3 cores

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{matrix.build_type}} --verbose --output-on-failure --parallel 3
- name: Test (Release)
working-directory: ${{github.workspace}}/build_release
run: ctest -C Release --verbose --output-on-failure --repeat until-pass:3 --parallel 4
79 changes: 49 additions & 30 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
compiler: [ g++-10, g++-11, g++-12, clang++-10, clang++-11, clang++-12 ]
build_type: [ Debug, Release ]
exclude:
- os: ubuntu-20.04
compiler: g++-12
Expand All @@ -47,29 +46,16 @@ jobs:
include:
- os: ubuntu-22.04
compiler: clang++-13
build_type: Debug
- os: ubuntu-22.04
compiler: clang++-13
build_type: Release
- os: ubuntu-22.04
compiler: clang++-14
build_type: Debug
- os: ubuntu-22.04
compiler: clang++-14
build_type: Release
- os: ubuntu-22.04
compiler: clang++-15
build_type: Debug
- os: ubuntu-22.04
compiler: clang++-15
build_type: Release
- os: ubuntu-20.04
compiler: g++-10
build_type: Release
cppstandard: -DCMAKE_CXX_STANDARD=20
cppname: C++20

name: ${{matrix.os}} with ${{matrix.compiler}} (${{matrix.build_type}} mode) ${{matrix.cppname}}
name: ${{matrix.os}} with ${{matrix.compiler}} ${{matrix.cppname}}
runs-on: ${{matrix.os}}

steps:
Expand All @@ -84,15 +70,15 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
key: '${{matrix.os}}-${{matrix.compiler}}-${{matrix.build_type}}'
key: '${{matrix.os}}-${{matrix.compiler}}'
variant: ccache
save: true
max-size: 10G

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.9.x'
python-version: '3.10.x'
cache: 'pip'

- name: Install pip packages
Expand All @@ -113,15 +99,50 @@ jobs:
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake
working-directory: ${{github.workspace}}/build
# Build and test pipeline for Debug mode

- name: Create Build Environment (Debug)
run: cmake -E make_directory ${{github.workspace}}/build_debug

- name: Configure CMake (Debug)
working-directory: ${{github.workspace}}/build_debug
run: >
cmake ${{github.workspace}} ${{matrix.cppstandard}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler}}
-DCMAKE_BUILD_TYPE=Debug
-DFICTION_ENABLE_UNITY_BUILD=ON
-DFICTION_ENABLE_PCH=ON
-DFICTION_CLI=ON
-DFICTION_TEST=ON
-DFICTION_BENCHMARK=OFF
-DFICTION_EXPERIMENTS=ON
-DFICTION_Z3=ON
-DFICTION_ENABLE_MUGEN=ON
-DFICTION_PROGRESS_BARS=OFF
-DFICTION_WARNINGS_AS_ERRORS=OFF
-DMOCKTURTLE_EXAMPLES=OFF

- name: Build (Debug)
working-directory: ${{github.workspace}}/build_debug
run: cmake --build . --config Debug -j4

- name: Test (Debug)
working-directory: ${{github.workspace}}/build_debug
run: ctest -C Debug --verbose --output-on-failure --repeat until-pass:3 --parallel 4


# Build and test pipeline for Release mode

- name: Create Build Environment (Release)
run: cmake -E make_directory ${{github.workspace}}/build_release

- name: Configure CMake (Release)
working-directory: ${{github.workspace}}/build_release
run: >
cmake ${{github.workspace}} ${{matrix.cppstandard}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler}}
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DCMAKE_BUILD_TYPE=Release
-DFICTION_ENABLE_UNITY_BUILD=ON
-DFICTION_ENABLE_PCH=ON
-DFICTION_CLI=ON
Expand All @@ -134,12 +155,10 @@ jobs:
-DFICTION_WARNINGS_AS_ERRORS=OFF
-DMOCKTURTLE_EXAMPLES=OFF

- name: Build fiction
working-directory: ${{github.workspace}}/build
run: cmake --build . --config ${{matrix.build_type}} -j4
- name: Build (Release)
working-directory: ${{github.workspace}}/build_release
run: cmake --build . --config Release -j4

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{matrix.build_type}} --verbose --output-on-failure --parallel 4
- name: Test (Release)
working-directory: ${{github.workspace}}/build_release
run: ctest -C Release --verbose --output-on-failure --repeat until-pass:3 --parallel 4
Loading
Loading