diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index d38637b3..de65a299 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -43,6 +43,9 @@ 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' @@ -50,7 +53,18 @@ jobs: 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 }} @@ -58,6 +72,7 @@ jobs: - uses: lukka/get-cmake@latest - name: Setup vcpkg + if: matrix.os_name != 'switch' uses: lukka/run-vcpkg@v11 id: runvcpkg with: @@ -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: |