Cleanup #4
Workflow file for this run
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
name: validate | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-linux: | |
name: Build Linux | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
type: [ Debug, Release ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ${{ runner.os }}-N64ModernRuntime-ccache-${{ matrix.type }} | |
- name: Install Linux Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ninja-build libgtk-3-dev lld llvm clang-15 | |
- name: Install SDL2 | |
run: | | |
# Install SDL2 | |
echo ::group::install SDL2 | |
# Enable ccache | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
wget https://www.libsdl.org/release/SDL2-2.26.1.tar.gz | |
tar -xzf SDL2-2.26.1.tar.gz | |
cd SDL2-2.26.1 | |
./configure | |
make -j $(nproc) | |
sudo make install | |
sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/ | |
echo ::endgroup:: | |
- name: Configure cmake | |
run: |- | |
# enable ccache | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
cmake -S . -B cmake-build -G Ninja -DCMAKE_MAKE_PROGRAM=ninja -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=clang++-15 -DCMAKE_C_COMPILER=clang-15 | |
- name: Build N64ModernRuntime | |
run: |- | |
cmake --build cmake-build --config ${{ matrix.type }} -j $(nproc) | |
build-windows: | |
name: Build Windows | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
type: [ Debug, Release ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ${{ runner.os }}-N64ModernRuntime-ccache-${{ matrix.type }} | |
- name: Install Windows Dependencies | |
run: | | |
choco install ninja | |
Remove-Item -Path "C:\ProgramData\Chocolatey\bin\ccache.exe" -Force -ErrorAction SilentlyContinue | |
- name: Configure Developer Command Prompt | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Configure cmake | |
run: |- | |
# enable ccache | |
set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH" | |
cmake -S . -B cmake-build -G Ninja -DCMAKE_MAKE_PROGRAM=ninja -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_FLAGS="-Xclang -fcxx-exceptions" | |
- name: Build N64ModernRuntime | |
run: |- | |
cmake --build cmake-build --config ${{ matrix.type }} -j 8 |