-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 'github: build with fedora 40 and add 2 build combinations back…
…' from Kefu Chai in order to address the infra issues caused by unreliable connection to llvm's apt repo, and to bring the two missing build combinations back, in this series, we switch from `setup-cpp` action to fedora 40, and extract the test job into a reusable workflow. Closes #2248 * github.com:scylladb/seastar: github: use fedora:40 image for testing github: add 2 testing combinations back to the matrix github: extract test.yaml into a resusable workflow
- Loading branch information
Showing
2 changed files
with
128 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Test | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
compiler: | ||
description: 'the C++ compiler to use' | ||
type: string | ||
required: true | ||
standard: | ||
description: 'the C++ standard to use' | ||
type: number | ||
required: true | ||
mode: | ||
description: 'build mode (debug, dev or release)' | ||
type: string | ||
required: true | ||
enables: | ||
description: 'the --enable-* option passed to configure.py' | ||
type: string | ||
default: '' | ||
required: false | ||
options: | ||
description: 'additional options passed to configure.py' | ||
type: string | ||
default: '' | ||
required: false | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
container: fedora:40 | ||
steps: | ||
- name: Install Git | ||
run: | | ||
sudo dnf -y install git | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "${{ contains(inputs.enables, 'dpdk') }}" | ||
|
||
- name: Install build dependencies | ||
run: | | ||
sudo ./install-dependencies.sh | ||
- name: Install clang++ | ||
if: ${{ inputs.compiler == 'clang++' }} | ||
run: | | ||
sudo dnf -y install clang | ||
- name: Install clang-scan-deps | ||
if: ${{ contains(inputs.enables, 'cxx-modules') }} | ||
run: | | ||
sudo dnf -y install clang-tools-extra | ||
- name: Install ccache | ||
run: | | ||
sudo dnf -y install ccache | ||
- name: Setup ccache | ||
uses: hendrikmuhs/ccache-action@v1 | ||
with: | ||
key: ${{ inputs.compiler }}-${{ inputs.standard }}-${{ inputs.mode }}-${{ inputs.enables }} | ||
|
||
- name: Configure | ||
run: | | ||
if [ ${{ inputs.compiler }} = "clang++" ]; then | ||
CC=clang | ||
else | ||
CC=gcc | ||
fi | ||
./configure.py \ | ||
--ccache \ | ||
--c++-standard ${{ inputs.standard }} \ | ||
--compiler ${{ inputs.compiler }} \ | ||
--c-compiler $CC \ | ||
--mode ${{ inputs.mode }} \ | ||
${{ inputs.options }} \ | ||
${{ inputs.enables }} | ||
- name: Build | ||
run: cmake --build build/${{inputs.mode}} | ||
|
||
- name: Check Header | ||
if: ${{ inputs.mode == 'dev' && inputs.compiler == 'clang++-18' }} | ||
run: cmake --build build/${{ inputs.mode }} --target checkheaders | ||
|
||
- name: Build with C++20 modules | ||
if: ${{ contains(inputs.enables, 'cxx-modules') }} | ||
run: cmake --build build/${{ inputs.mode }} --target hello_cxx_module | ||
|
||
- name: Test | ||
if: ${{ ! contains(inputs.enables, 'cxx-modules') }} | ||
run: ./test.py --mode=${{ inputs.mode }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters