Adds macOS build to prevent regressions for developers. #510
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: Build | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '.github/**' | |
- '!.github/workflows/**' | |
- 'README.md' | |
pull_request: | |
paths-ignore: | |
- '.github/**' | |
- '!.github/workflows/**' | |
- 'README.md' | |
workflow_dispatch: | |
jobs: | |
BuildISO: | |
name: Build ISO | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone tree | |
uses: actions/checkout@v3 | |
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: | | |
nxdk_pgraph_tests/build/xiso/nxdk_pgraph_tests_xiso/nxdk_pgraph_tests_xiso.iso | |
BuildMacOS: | |
name: Build macOS | |
runs-on: macOS-latest | |
steps: | |
- name: Clone tree | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
path: nxdk_pgraph_tests | |
- name: Install dependencies | |
run: | | |
export HOMEBREW_NO_AUTO_UPDATE=1 | |
export HOMEBREW_NO_INSTALL_CLEANUP=1 | |
brew install \ | |
cmake \ | |
coreutils \ | |
llvm@19 \ | |
lld | |
- name: Prewarm nxdk | |
working-directory: nxdk_pgraph_tests | |
run: | | |
export PATH="$(brew --prefix llvm@19)/bin:$PATH" | |
bash ${GITHUB_WORKSPACE}/nxdk_pgraph_tests/prewarm-nxdk.sh | |
- name: Compile | |
run: | | |
cd nxdk_pgraph_tests | |
# The default clang install will result in linker failures on macOS. | |
export PATH="$(brew --prefix llvm@19)/bin:$PATH" | |
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) |