mirror of
https://github.com/mrxenginner/reVC.git
synced 2026-10-10 20:03:05 +08:00
1e41b490b7
* Update CMakeLists.txt * Update build-switch.yml * Update README by removing badges Removed build status and Discord badge from README.
76 lines
1.9 KiB
YAML
76 lines
1.9 KiB
YAML
name: Build reVC.nro (Nintendo Switch)
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Release version. Leave it empty to avoid publishing a release.'
|
|
required: false
|
|
type: string
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: devkitpro/devkita64:latest
|
|
options: --user root
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: 'recursive'
|
|
|
|
- name: Install required Switch libraries
|
|
run: |
|
|
dkp-pacman -S --noconfirm --needed \
|
|
switch-mesa \
|
|
switch-libdrm_nouveau \
|
|
switch-glfw \
|
|
switch-glm \
|
|
switch-libpng \
|
|
switch-mpg123 \
|
|
switch-openal-soft \
|
|
switch-sdl2
|
|
|
|
- name: Build
|
|
run: |
|
|
/opt/devkitpro/portlibs/switch/bin/aarch64-none-elf-cmake -S. -Bbuild \
|
|
-DREVC_AUDIO=OAL -DLIBRW_PLATFORM=GL3 -DLIBRW_GL3_GFXLIB=GLFW \
|
|
-DREVC_WITH_OPUS=False -DREVC_VENDORED_LIBRW=True -DREVC_INSTALL=True
|
|
cmake --build build --parallel
|
|
|
|
- name: Collect NRO
|
|
run: find build -name 'reVC.nro' -exec cp {} reVC.nro \;
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: reVC-switch
|
|
path: reVC.nro
|
|
if-no-files-found: error
|
|
|
|
release:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'workflow_dispatch' && inputs.version != ''
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Download build artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: reVC-switch
|
|
|
|
- name: Create GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: "v${{ inputs.version }}"
|
|
name: "reVC v${{ inputs.version }}"
|
|
files: reVC.nro
|
|
draft: false
|
|
prerelease: false
|