Skip to content

Commit

Permalink
Test Switch build
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRevo3D authored Sep 8, 2024
1 parent f0ec20e commit 2fc8646
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,36 @@ jobs:
- os: macos-13
os_name: macos-x64
triplet: x64-osx-dynamic
- os: ubuntu-latest
os_name: switch
triplet: none
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
vcpkgCommitId: '0f88ecb8528605f91980b90a2c5bad88e3cb565f'

steps:
- uses: actions/checkout@v3

- name: Download Switch deps
if: matrix.os_name == 'switch'
uses: blauqs/action-download-asset@master
with:
repo: MrRevo3D/impacto
version: buildtag
file: devkitpro.tar.gz
out: /opt
token: ${{ secrets.SWITCH_BUILD_TOKEN }}

- name: Cache LibAtrac9
if: matrix.os_name != 'switch'
uses: actions/cache@v3
with:
key: libatrac9 | ${{ matrix.os_name }}
path: vendor/LibAtrac9

- uses: lukka/get-cmake@latest
- name: Setup vcpkg
if: matrix.os_name != 'switch'
uses: lukka/run-vcpkg@v11
id: runvcpkg
with:
Expand Down Expand Up @@ -94,12 +109,26 @@ jobs:
run: brew install nasm
if: contains(matrix.os_name, 'macos')
- name: Run CMake with vcpkg.json manifest
if: matrix.os_name != 'switch'
uses: lukka/run-cmake@v10
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
configurePreset: ci-release
configurePresetAdditionalArgs: "['-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}', '-DVCPKG_HOST_TRIPLET=${{ matrix.triplet }}', '-DVCPKG_BUILD_TYPE=release']"
buildPreset: CI-Build

- name: Run Switch build
if: matrix.os_name == 'switch'
run: |-
export DEVKITPRO=/opt/devkitpro
export DEVKITARM=/opt/devkitpro/devkitARM
export PATH="/opt/devkitpro/tools/bin:$PATH"
cmake . -DCMAKE_TOOLCHAIN_FILE=HorizonNX.toolchain
make -j2
elf2nro impacto impacto.nro
cp impacto.nro "${{ github.workspace }}/release/ci-release"
cp profiles "${{ github.workspace }}/release/ci-release"
cp games "${{ github.workspace }}/release/ci-release"
- name: Copy docs
run: |
Expand Down

0 comments on commit 2fc8646

Please sign in to comment.