Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 56 additions & 13 deletions .github/workflows/impacto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,29 +228,72 @@ jobs:
image: ghcr.io/committeeofzero/impacto-switch:latest
env:
VERSION: ${{ needs.get-version.outputs.VERSION }}
PresetName: ci-release-switch
vcpkgCommitId: '62159a45e18f3a9ac0548628dcaf74fcb60c6ff9'
VCPKG_FORCE_DOWNLOADED_BINARIES: 1
VCPKG_BINARY_SOURCES: >-
${{ github.event_name == 'pull_request_target' &&
(github.event.pull_request.head.repo.full_name != github.repository)
&& 'clear;nuget,https://nuget.pkg.github.com/committeeofzero/index.json,read'
|| 'clear;nuget,https://nuget.pkg.github.com/committeeofzero/index.json,readwrite' }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ needs.lint.outputs.commitid }}
- name: Run build
run: |-
cmake . -DCMAKE_TOOLCHAIN_FILE=HorizonNX.toolchain
make -j2
elf2nro impacto impacto.nro
mkdir -p "release/ci-release"
cp impacto.nro "release/ci-release"
cp -r profiles "release/ci-release"
cp -r resources "release/ci-release"
- name: Copy Shaders
run: cp -r src/shaders "release/ci-release"

- uses: lukka/get-cmake@latest

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
id: runvcpkg
with:
vcpkgDirectory: '${{ runner.workspace }}/build/vcpkg'
vcpkgGitCommitId: '${{ env.vcpkgCommitId }}'
vcpkgJsonGlob: '**/vcpkg.json'

- name: Configure NuGet feed via vcpkg
shell: bash
env:
FEED_URL: 'https://nuget.pkg.github.com/committeeofzero/index.json'
run: |
NUGET_PATH=$(vcpkg fetch nuget | tail -n 1)

if [[ "$NUGET_PATH" == *.exe && "$RUNNER_OS" != "Windows" ]]; then
EXEC=(mono "$NUGET_PATH")
else
EXEC=("$NUGET_PATH")
fi

"${EXEC[@]}" sources add \
-Source "${{ env.FEED_URL }}" \
-StorePasswordInClearText \
-Name GitHubPackages \
-UserName "GithubCI" \
-Password "${{ github.token }}"

"${EXEC[@]}" setapikey "${{ github.token }}" \
-Source "${{ env.FEED_URL }}"

- name: Run CMake with vcpkg.json manifest
uses: lukka/run-cmake@v10
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
configurePreset: ${{ env.PresetName }}
buildPreset: ${{ env.PresetName }}

- name: Package NRO
run: |
elf2nro "release/${{ env.PresetName }}/impacto" "release/${{ env.PresetName }}/impacto.nro"
shell: bash

- name: Copy docs
run: |
cp THIRDPARTY.md README.md LICENSE "release/ci-release"
cp THIRDPARTY.md README.md LICENSE "release/${{ env.PresetName }}"
shell: bash

- name: Archive Artifacts
run: |
mv ./release/ci-release ./release/impacto
mv ./release/${{ env.PresetName }} ./release/impacto
7z a -tzip -mm=Deflate -mx=9 impacto-switch-${{ env.VERSION }}${{ github.run_number }}-${{ github.sha }}.zip ./release/impacto
- name: Upload Artifact
uses: actions/upload-artifact@v7
Expand Down
Loading
Loading