mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-11 16:46:16 +00:00
Add clang-18 build
This commit is contained in:
52
.github/workflows/build.yml
vendored
52
.github/workflows/build.yml
vendored
@@ -54,8 +54,8 @@ jobs:
|
|||||||
- name: CMake Test
|
- name: CMake Test
|
||||||
run: cd build/${{matrix.preset}} && ctest --verbose
|
run: cd build/${{matrix.preset}} && ctest --verbose
|
||||||
|
|
||||||
build-linux:
|
build-linux-gcc:
|
||||||
name: Build Linux
|
name: Build Linux GCC
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -83,6 +83,52 @@ jobs:
|
|||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Linux ${{matrix.configuration}} Artifacts
|
name: Linux GCC ${{matrix.configuration}} Artifacts
|
||||||
|
path: |
|
||||||
|
build/${{matrix.preset}}/artifacts/*
|
||||||
|
|
||||||
|
build-linux-clang:
|
||||||
|
name: Build Linux Clang
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
configuration:
|
||||||
|
- Debug
|
||||||
|
- Release
|
||||||
|
include:
|
||||||
|
- configuration: Debug
|
||||||
|
preset: debug
|
||||||
|
- configuration: Release
|
||||||
|
preset: release
|
||||||
|
steps:
|
||||||
|
- name: Checkout Source
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install Ninja
|
||||||
|
uses: seanmiddleditch/gha-setup-ninja@v5
|
||||||
|
|
||||||
|
- name: Install Clang
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y wget gnupg software-properties-common
|
||||||
|
wget https://apt.llvm.org/llvm-snapshot.gpg.key -O- | sudo gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg
|
||||||
|
echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] https://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-$(lsb_release -sc)-18 main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y clang-18 lld-18
|
||||||
|
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-18 100
|
||||||
|
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-18 100
|
||||||
|
sudo update-alternatives --set cc /usr/bin/clang-18
|
||||||
|
sudo update-alternatives --set c++ /usr/bin/clang++-18
|
||||||
|
|
||||||
|
- name: CMake Build
|
||||||
|
run: cmake --workflow --preset=${{matrix.preset}}
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Linux Clang ${{matrix.configuration}} Artifacts
|
||||||
path: |
|
path: |
|
||||||
build/${{matrix.preset}}/artifacts/*
|
build/${{matrix.preset}}/artifacts/*
|
||||||
|
|||||||
Reference in New Issue
Block a user