Skip to content

Commit

Permalink
CI: modernize compiler selection and cleanup workflow
Browse files Browse the repository at this point in the history
- add clang17
- also run on prs not targeted at main
- small cleanups
  • Loading branch information
wirew0rm committed Oct 9, 2023
1 parent 9d6299e commit 5c82668
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [ created ]

Expand All @@ -26,6 +25,9 @@ jobs:
- name: Ubuntu Latest clang16
os: ubuntu-22.04
compiler: clang16
- name: Ubuntu Latest clang17
os: ubuntu-22.04
compiler: clang17
- name: Ubuntu Latest emscripten
os: ubuntu-22.04
compiler: emscripten
Expand Down Expand Up @@ -69,6 +71,16 @@ jobs:
sudo apt install -y clang-16 libc++-16-dev libc++abi-16-dev
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-16 110
- name: Install clang-17
if: matrix.configurations.compiler == 'clang17'
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
sudo apt update
sudo apt upgrade -y # update clang14 to fix packaging conflicts
sudo apt install -y clang-17 libc++-17-dev libc++abi-17-dev
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-17 110
- name: Install emscripten
if: matrix.configurations.compiler == 'emscripten'
shell: bash
Expand Down Expand Up @@ -142,6 +154,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
test -f ~/emsdk/emsdk_env.sh && source ~/emsdk/emsdk_env.sh
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
# Consult https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarscanner-cli/ for more information and options

0 comments on commit 5c82668

Please sign in to comment.