nxdk_pgraph_tests/.github/workflows/build.yml
2023-07-13 21:21:18 -07:00

62 lines
1.8 KiB
YAML

name: Build
on:
push:
branches:
- main
paths-ignore:
- '.github/**'
- '!.github/workflows/**'
- 'README.md'
pull_request:
paths-ignore:
- '.github/**'
- '!.github/workflows/**'
- 'README.md'
jobs:
BuildISO:
name: Build ISO
runs-on: ubuntu-latest
steps:
- name: Clone tree
uses: actions/checkout@v2
with:
submodules: recursive
path: nxdk_pgraph_tests
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
llvm \
lld \
libsdl2-dev \
libsdl2-image-dev \
ninja-build
pip3 install nv2a-vsh
- name: Prewarm nxdk
working-directory: nxdk_pgraph_tests
run: bash ${GITHUB_WORKSPACE}/nxdk_pgraph_tests/prewarm-nxdk.sh
- name: Compile
run: |
cd nxdk_pgraph_tests
export NXDK_DIR="${GITHUB_WORKSPACE}/nxdk_pgraph_tests/third_party/nxdk"
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE="${NXDK_DIR}/share/toolchain-nxdk.cmake" \
-DENABLE_PROGRESS_LOG=ON \
-DDUMP_CONFIG_FILE=ON \
-DRUNTIME_CONFIG_PATH="e:/nxdk_pgraph_tests/pgraph_tests.cnf"
cmake --build build -- -j$(grep -c processor /proc/cpuinfo)
- name: Create release
if: github.ref == 'refs/heads/main'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "xiso containing pgraph tests"
files: |
build/xiso/nxdk_pgraph_tests_xiso/nxdk_pgraph_tests_xiso.iso