Skip to content

Workflow file for this run

name: Switch build
on:
push:
branches: [ "*" ]
pull_request:
types: [opened, reopened]
workflow_dispatch:
inputs:
nx:
description: build nintendo switch
type: boolean
permissions:
contents: write
jobs:
build-nx:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
arch: [x86_64]
mode: [debug]
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'ci skip')"
container: devkitpro/devkita64
steps:
- name: Get current date as package key
id: cache_key
run: echo "key=$(date +'%W')" >> $GITHUB_OUTPUT
- name: Checkout repository
uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get -y install gcc
- name: Set xmake env
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@dev
actions-cache-folder: .xmake-cache-W${{ steps.cache_key.outputs.key }}
- name: Update xmake repository
run: xmake repo --update --root && xmake repo -u --root && dkp-pacman -Rs --noconfirm switch-tinyxml2
- name: Configure xmake and install dependencies
run: xmake f --yes -p switch -m ${{ matrix.mode }} -a aarch64 --toolchain=devkita64 -vD --root
- name: Build SimpleModDownloader
run: xmake -vD --root
- uses: actions/upload-artifact@v2
with:
name: SimpleModDownloader
path: build/switch/aarch64/debug/SimpleModDownloader.nro