n64/.github/workflows/build.yml
2022-06-16 20:21:45 -07:00

128 lines
3.2 KiB
YAML

name: Build
on: push
jobs:
build-windows:
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@master
with:
submodules: true
- name: Setup dependencies
run: |
vcpkg install shaderc:x64-windows
vcpkg install sdl2[vulkan]:x64-windows
- name: Build N64
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -T clangcl -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake ..
cmake --build . --config Release
shell: cmd
- name: Collect files
run: |
mkdir upload
move build\Release\n64.exe upload
move build\Release\SDL2.dll upload
- name: Upload files
uses: actions/upload-artifact@master
with:
name: n64-windows
path: upload
build-windows-debug:
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@master
with:
submodules: true
- name: Setup dependencies
run: |
vcpkg install shaderc:x64-windows
vcpkg install sdl2[vulkan]:x64-windows
- name: Build N64
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -T clangcl -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake ..
cmake --build . --config Debug
shell: cmd
- name: Collect files
run: |
mkdir upload
move build\Debug\n64.exe upload
move build\Debug\*.dll upload
- name: Upload files
uses: actions/upload-artifact@master
with:
name: n64-windows-debug
path: upload
build-linux:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@master
with:
submodules: true
- name: Setup dependencies
run: |
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-focal.list https://packages.lunarg.com/vulkan/lunarg-vulkan-focal.list
sudo apt-get update -y -qq
sudo apt-get install shaderc libsdl2-dev libgtk-3-dev
- name: Setup chksum64 and bass
run: |
mkdir -p tmp
cd tmp
wget https://raw.githubusercontent.com/DragonMinded/libdragon/trunk/tools/chksum64.c
gcc chksum64.c -o chksum64
sudo mv chksum64 /bin/
git clone https://github.com/ARM9/bass.git
cd bass/bass
git checkout v14
make
sudo mv bass /bin/
- name: Build N64
run: |
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
strip n64
- name: Run tests on N64
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: |
cd build
make test
- name: Collect files
run: |
mkdir upload
mv build/n64 upload
- name: Upload files
uses: actions/upload-artifact@master
with:
name: n64-linux
path: upload