Skip to content

Commit

Permalink
Merge pull request #624 from elbeno/update-workflows
Browse files Browse the repository at this point in the history
⬆️ 👷 Update workflows to ubuntu-24.04
  • Loading branch information
lukevalenty authored Oct 4, 2024
2 parents 776e6b7 + d096965 commit 3b3399d
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 57 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/asciidoctor-ghpages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
jobs:
configure:
name: Configure Github Pages Publishing
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-24.04
outputs:
enable_publish: ${{ steps.check.outputs.isfork == 'NO' }}
steps:
Expand All @@ -30,18 +30,17 @@ jobs:
build:
needs: configure
name: Build Documentation
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-24.04
steps:
- name: Checkout source
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: 18
node-version: 20
- name: Install Mermaid
run: |
sudo npm install -g @mermaid-js/[email protected]
node /usr/local/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer/install.js
sudo npm install -g @mermaid-js/[email protected]
- name: Install asciidoctor
run: |
sudo apt update
Expand Down Expand Up @@ -73,7 +72,7 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-24.04
steps:
- name: Deploy to github pages
id: deployment
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/performance_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,28 @@ on:
branches: [ main ]

env:
DEBIAN_FRONTEND: noninteractive
CMAKE_GENERATOR: Ninja
BUILD_TYPE: Release
LLVM_VERSION: 18

jobs:
performance_test:
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-latest
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-24.04
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Install compiler
run: sudo apt update && sudo apt-get install -y clang-14
run: sudo apt update && sudo apt install -y clang-${{env.LLVM_VERSION}}

- name: Install build tools
run: |
sudo apt install -y ninja-build
- name: Configure CMake
env:
CC: "/usr/lib/llvm-14/bin/clang"
CXX: "/usr/lib/llvm-14/bin/clang++"
CC: "/usr/lib/llvm-${{env.LLVM_VERSION}}/bin/clang"
CXX: "/usr/lib/llvm-${{env.LLVM_VERSION}}/bin/clang++"
CXX_STANDARD: 20
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:

jobs:
release:
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-latest
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-24.04
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/single_header.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:

jobs:
build_single_header:
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-latest
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-24.04
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

Expand Down
144 changes: 99 additions & 45 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ concurrency:
cancel-in-progress: true

jobs:
build_and_test:
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
build_and_test_24:
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-24.04
strategy:
fail-fast: false
matrix:
compiler: [clang, gcc]
version: [12, 13, 14, 15, 16, 17, 18]
version: [12, 13, 16, 17, 18]
cxx_standard: [20]
stdlib: [libstdc++, libc++]
build_type: [Debug]
Expand All @@ -47,51 +47,33 @@ jobs:
cxx_flags: "-stdlib=libc++"
- version: 17
compiler: clang
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 17
install: sudo apt update && sudo apt install -y clang-17
toolchain_root: "/usr/lib/llvm-17"
- version: 17
compiler: clang
stdlib: libc++
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 17 && sudo apt install -y libc++-17-dev libc++abi-17-dev
install: sudo apt update && sudo apt install -y clang-17 libc++-17-dev libc++abi-17-dev
cxx_flags: "-stdlib=libc++"
- version: 16
compiler: clang
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 16
install: sudo apt update && sudo apt install -y clang-16
toolchain_root: "/usr/lib/llvm-16"
- version: 16
compiler: clang
stdlib: libc++
install: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 16 && sudo apt install -y libc++-16-dev libc++abi-16-dev
cxx_flags: "-stdlib=libc++"
- version: 15
compiler: clang
install: sudo apt update && sudo apt install -y clang-15
toolchain_root: "/usr/lib/llvm-15"
- version: 15
compiler: clang
stdlib: libc++
install: sudo apt update && sudo apt install -y clang-15 libc++-15-dev libc++abi-15-dev
cxx_flags: "-stdlib=libc++"
- version: 14
compiler: clang
install: sudo apt update && sudo apt install -y clang-14
toolchain_root: "/usr/lib/llvm-14"
- version: 14
compiler: clang
stdlib: libc++
install: sudo apt update && sudo apt install -y clang-14 libc++-14-dev libc++abi-14-dev
install: sudo apt update && sudo apt install -y clang-16 libc++-16-dev libc++abi-16-dev
cxx_flags: "-stdlib=libc++"
- compiler: gcc
toolchain_root: "/usr"
cxx_flags: ""
- version: 13
compiler: gcc
install: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-13 g++-13
install: sudo apt update && sudo apt install -y gcc-13 g++-13
cc: "gcc-13"
cxx: "g++-13"
- version: 12
compiler: gcc
install: sudo apt update && sudo apt install -y gcc-12
install: sudo apt update && sudo apt install -y gcc-12 g++-12
cc: "gcc-12"
cxx: "g++-12"
cxx_flags: ""
Expand All @@ -102,13 +84,6 @@ jobs:
version: 17
- compiler: gcc
version: 16
- compiler: gcc
version: 15
- compiler: gcc
version: 14
- compiler: clang
version: 14
stdlib: libstdc++
- compiler: clang
version: 13
- compiler: clang
Expand Down Expand Up @@ -157,8 +132,87 @@ jobs:
working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure -j $(nproc) -C ${{matrix.build_type}}

quality_checks_pass:
build_and_test_22:
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler: [clang]
version: [14, 15]
cxx_standard: [20]
stdlib: [libstdc++, libc++]
build_type: [Debug]
include:
- compiler: clang
cc: "clang"
cxx: "clang++"
cxx_flags: "-stdlib=libstdc++"
- version: 15
compiler: clang
install: sudo apt update && sudo apt install -y clang-15
toolchain_root: "/usr/lib/llvm-15"
- version: 15
compiler: clang
stdlib: libc++
install: sudo apt update && sudo apt install -y clang-15 libc++-15-dev libc++abi-15-dev
cxx_flags: "-stdlib=libc++"
- version: 14
compiler: clang
install: sudo apt update && sudo apt install -y clang-14
toolchain_root: "/usr/lib/llvm-14"
- version: 14
compiler: clang
stdlib: libc++
install: sudo apt update && sudo apt install -y clang-14 libc++-14-dev libc++abi-14-dev
cxx_flags: "-stdlib=libc++"
exclude:
- compiler: clang
version: 14
stdlib: libstdc++

steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Install build tools
run: |
${{ matrix.install }}
sudo apt install -y ninja-build
- name: Restore CPM cache
env:
cache-name: cpm-cache-0
id: cpm-cache-restore
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/cpm-cache
key: ${{runner.os}}-${{env.cache-name}}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
restore-keys: |
${{runner.os}}-${{env.cache-name}}-
- name: Configure CMake
env:
CC: ${{matrix.toolchain_root}}/bin/${{matrix.cc}}
CXX: ${{matrix.toolchain_root}}/bin/${{matrix.cxx}}
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}} -DCMAKE_CXX_FLAGS_INIT=${{matrix.cxx_flags}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCPM_SOURCE_CACHE=~/cpm-cache

- name: Save CPM cache
env:
cache-name: cpm-cache-0
if: steps.cpm-cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/cpm-cache
key: ${{runner.os}}-${{env.cache-name}}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}

- name: Build Unit Tests
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -v -t build_unit_tests

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure -j $(nproc) -C ${{matrix.build_type}}

quality_checks_pass:
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-24.04
steps:
- name: Checkout target branch
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
Expand All @@ -175,16 +229,17 @@ jobs:
- name: Install build tools
run: |
wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh ${{env.DEFAULT_LLVM_VERSION}}
sudo apt install -y python3-pip ninja-build clang-tidy-${{env.DEFAULT_LLVM_VERSION}} clang-format-${{env.DEFAULT_LLVM_VERSION}}
sudo apt install -y pipx ninja-build clang-tidy-${{env.DEFAULT_LLVM_VERSION}} clang-format-${{env.DEFAULT_LLVM_VERSION}}
- name: Install cmake-format
run: |
sudo pip3 install --upgrade pip
sudo pip3 install pyyaml cmake-format
pipx install cmakelang
pipx inject cmakelang pyyaml
echo "/opt/pipx_bin" >> $GITHUB_PATH
- name: Install python quality tools
run: |
sudo pip3 install mypy
pipx install mypy
- name: Restore CPM cache
env:
Expand Down Expand Up @@ -217,7 +272,7 @@ jobs:
run: cmake --build ${{github.workspace}}/build -t ci-quality

sanitize:
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -232,7 +287,7 @@ jobs:
- compiler: gcc
cc: "gcc-13"
cxx: "g++-13"
install: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-13 g++-13
install: sudo apt update && sudo apt install -y gcc-13 g++-13
toolchain_root: "/usr"

steps:
Expand Down Expand Up @@ -281,13 +336,12 @@ jobs:
run: cmake --build ${{github.workspace}}/build -t unit_tests

valgrind:
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-24.04
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Install build tools
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update && sudo apt install -y gcc-${{env.DEFAULT_GCC_VERSION}} g++-${{env.DEFAULT_GCC_VERSION}} ninja-build valgrind
- name: Restore CPM cache
Expand Down Expand Up @@ -353,8 +407,8 @@ jobs:
test $FAILSIZE = "0"
merge_ok:
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
needs: [build_and_test, quality_checks_pass, sanitize, valgrind]
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-24.04
needs: [build_and_test_24, build_and_test_22, quality_checks_pass, sanitize, valgrind]
if: ${{ !cancelled() }}
steps:
- name: Enable merge
Expand Down

0 comments on commit 3b3399d

Please sign in to comment.