CI: install devkitPro on runner instead of nested docker
Some checks failed
Build / switch (push) Failing after 18s
Some checks failed
Build / switch (push) Failing after 18s
Nested docker run broke under act (empty /work, no Makefile). Use official install-devkitpro-pacman + dkp-pacman switch-dev on ubuntu-latest. Made-with: Cursor
This commit is contained in:
29
.github/workflows/build.yml
vendored
29
.github/workflows/build.yml
vendored
@@ -12,20 +12,31 @@ jobs:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
DEVKITPRO: /opt/devkitpro
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Build inside devkitPro image only. A job-level container would run every
|
||||
# step there and break actions/checkout (needs Node). Same issue with `act`.
|
||||
- name: Compile (Switch .nro)
|
||||
# Install toolchain on the runner (no nested docker). Nested `docker run -v
|
||||
# "$GITHUB_WORKSPACE"` fails under act: the mount points at an empty path.
|
||||
- name: Install devkitPro
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v "${{ github.workspace }}:/work" \
|
||||
-w /work \
|
||||
-e DEVKITPRO=/opt/devkitpro \
|
||||
devkitpro/devkita64:latest \
|
||||
bash -lc 'make -j$(nproc)'
|
||||
set -euo pipefail
|
||||
wget -q -U "dkp-apt" -O ./install-devkitpro-pacman https://apt.devkitpro.org/install-devkitpro-pacman
|
||||
chmod +x ./install-devkitpro-pacman
|
||||
yes | sudo ./install-devkitpro-pacman
|
||||
sudo dkp-pacman -Sy
|
||||
sudo dkp-pacman -S switch-dev --noconfirm
|
||||
|
||||
- name: Add devkitPro tools to PATH
|
||||
run: |
|
||||
echo "/opt/devkitpro/devkitA64/bin" >> "$GITHUB_PATH"
|
||||
echo "/opt/devkitpro/tools/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Compile (Switch .nro)
|
||||
run: make -j$(nproc)
|
||||
|
||||
- name: Upload .nro artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
Reference in New Issue
Block a user