mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-11 16:46:16 +00:00
Test unifying build jobs
This commit is contained in:
160
.github/workflows/build.yml
vendored
160
.github/workflows/build.yml
vendored
@@ -18,8 +18,6 @@ jobs:
|
|||||||
dump-registry:
|
dump-registry:
|
||||||
name: Dump Registry
|
name: Dump Registry
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Source
|
- name: Checkout Source
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -30,89 +28,21 @@ jobs:
|
|||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Registry Dump
|
name: Registry Dump [Temp]
|
||||||
path: |
|
path: |
|
||||||
registry/*
|
registry/*
|
||||||
|
|
||||||
build-windows:
|
build:
|
||||||
name: Build Windows
|
name: Build
|
||||||
runs-on: windows-latest
|
runs-on: ${{ matrix.runner }}
|
||||||
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: Enable Developer Command Prompt
|
|
||||||
uses: ilammy/msvc-dev-cmd@v1.13.0
|
|
||||||
|
|
||||||
- name: CMake Build
|
|
||||||
run: cmake --workflow --preset=${{matrix.preset}}
|
|
||||||
|
|
||||||
- name: Upload Artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: Windows ${{matrix.configuration}} Artifacts
|
|
||||||
path: |
|
|
||||||
build/${{matrix.preset}}/artifacts/*
|
|
||||||
|
|
||||||
- name: Upload Test Configuration
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: Windows ${{matrix.configuration}} Test Config
|
|
||||||
path: |
|
|
||||||
build/${{matrix.preset}}/**/CTestTestfile.cmake
|
|
||||||
|
|
||||||
build-linux-gcc:
|
|
||||||
name: Build Linux GCC
|
|
||||||
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: CMake Build
|
|
||||||
run: cmake --workflow --preset=${{matrix.preset}}
|
|
||||||
|
|
||||||
- name: Upload Artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: Linux GCC ${{matrix.configuration}} Artifacts
|
|
||||||
path: |
|
|
||||||
build/${{matrix.preset}}/artifacts/*
|
|
||||||
|
|
||||||
build-linux-clang:
|
|
||||||
name: Build Linux Clang
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
platform:
|
||||||
|
- Windows
|
||||||
|
- Linux GCC
|
||||||
|
- Linux Clang
|
||||||
|
- macOS
|
||||||
configuration:
|
configuration:
|
||||||
- Debug
|
- Debug
|
||||||
- Release
|
- Release
|
||||||
@@ -121,6 +51,15 @@ jobs:
|
|||||||
preset: debug
|
preset: debug
|
||||||
- configuration: Release
|
- configuration: Release
|
||||||
preset: release
|
preset: release
|
||||||
|
- platform: Windows
|
||||||
|
runner: windows-latest
|
||||||
|
- platform: Linux GCC
|
||||||
|
runner: ubuntu-24.04
|
||||||
|
- platform: Linux Clang
|
||||||
|
runner: ubuntu-24.04
|
||||||
|
clang-version: 18
|
||||||
|
- platform: macOS
|
||||||
|
runner: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Source
|
- name: Checkout Source
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -131,17 +70,22 @@ jobs:
|
|||||||
uses: seanmiddleditch/gha-setup-ninja@v5
|
uses: seanmiddleditch/gha-setup-ninja@v5
|
||||||
|
|
||||||
- name: Install Clang
|
- name: Install Clang
|
||||||
|
if: "${{ matrix.platform == 'Linux Clang' }}"
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y wget gnupg software-properties-common
|
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
|
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
|
echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] https://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-$(lsb_release -sc)-${{ matrix.clang-version }} main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y clang-18 lld-18
|
sudo apt install -y clang-${{ matrix.clang-version }} lld-${{ matrix.clang-version }}
|
||||||
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-18 100
|
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${{ matrix.clang-version }} 100
|
||||||
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-18 100
|
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${{ matrix.clang-version }} 100
|
||||||
sudo update-alternatives --set cc /usr/bin/clang-18
|
sudo update-alternatives --set cc /usr/bin/clang-${{ matrix.clang-version }}
|
||||||
sudo update-alternatives --set c++ /usr/bin/clang++-18
|
sudo update-alternatives --set c++ /usr/bin/clang++-${{ matrix.clang-version }}
|
||||||
|
|
||||||
|
- name: Enable Developer Command Prompt
|
||||||
|
uses: ilammy/msvc-dev-cmd@v1.13.0
|
||||||
|
if: "${{ matrix.platform == 'Windows' }}"
|
||||||
|
|
||||||
- name: CMake Build
|
- name: CMake Build
|
||||||
run: cmake --workflow --preset=${{matrix.preset}}
|
run: cmake --workflow --preset=${{matrix.preset}}
|
||||||
@@ -149,40 +93,22 @@ jobs:
|
|||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Linux Clang ${{matrix.configuration}} Artifacts
|
name: ${{ matrix.platform }} ${{matrix.configuration}} Artifacts
|
||||||
path: |
|
path: |
|
||||||
build/${{matrix.preset}}/artifacts/*
|
build/${{matrix.preset}}/artifacts/*
|
||||||
|
|
||||||
build-mac:
|
- name: Upload Test Configuration
|
||||||
name: Build macOS
|
uses: actions/upload-artifact@v4
|
||||||
runs-on: macos-latest
|
with:
|
||||||
strategy:
|
name: ${{ matrix.platform }} ${{matrix.configuration}} Test Config [Temp]
|
||||||
fail-fast: false
|
path: |
|
||||||
matrix:
|
build/${{matrix.preset}}/**/CTestTestfile.cmake
|
||||||
configuration:
|
cleanup:
|
||||||
- Debug
|
name: Cleanup Artifacts
|
||||||
- Release
|
runs-on: ubuntu-latest
|
||||||
include:
|
needs: [dump-registry, build]
|
||||||
- configuration: Debug
|
if: always()
|
||||||
preset: debug
|
|
||||||
- configuration: Release
|
|
||||||
preset: release
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Source
|
- uses: geekyeggo/delete-artifact@v5
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
name: '*[Temp]'
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: |
|
|
||||||
brew install ninja
|
|
||||||
|
|
||||||
- name: CMake Build
|
|
||||||
run: cmake --workflow --preset=${{matrix.preset}}
|
|
||||||
|
|
||||||
- name: Upload Artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: macOS ${{matrix.configuration}} Artifacts
|
|
||||||
path: |
|
|
||||||
build/${{matrix.preset}}/artifacts/*
|
|
||||||
|
|||||||
Reference in New Issue
Block a user