Let's see what happens if I mess up the version number #277
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Artifacts | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]" | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- "**.md" | |
- ".gitignore" | |
jobs: | |
windows: | |
name: Windows (x86_64) | |
uses: ./.github/workflows/build.yaml | |
with: | |
archive-name: melondsds_libretro-win32-x86_64 | |
runs-on: windows-latest | |
target: win32 | |
info-dir: info | |
lib-ext: dll | |
shell: msys2 {0} | |
cmake-args: -DENABLE_SCCACHE=ON -DSCCACHE="C:/Users/runneradmin/.cargo/bin/sccache.exe" | |
macos: | |
name: macOS (Universal) | |
uses: ./.github/workflows/build.yaml | |
with: | |
archive-name: melondsds_libretro-macos-universal | |
runs-on: macos-latest | |
target: macos-universal | |
lib-ext: dylib | |
cmake-args: -DCMAKE_OSX_ARCHITECTURES:STRING="arm64;x86_64" -DENABLE_OGLRENDERER=OFF | |
# Disabled OpenGL on macOS due to https://github.com/JesseTG/melonds-ds/issues/12 | |
linux-x86_64: | |
name: Linux (x86_64) | |
uses: ./.github/workflows/build.yaml | |
with: | |
archive-name: melondsds_libretro-linux-x86_64 | |
target: linux-x86_64 | |
runs-on: ubuntu-latest | |
lib-ext: so | |
test-suite: true | |
linux-aarch64: | |
name: Linux (aarch64) | |
uses: ./.github/workflows/build.yaml | |
with: | |
archive-name: melondsds_libretro-linux-aarch64 | |
target: linux-aarch64 | |
runs-on: ubuntu-latest | |
lib-ext: so | |
cmake-args: -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DPKG_CONFIG_EXECUTABLE=/usr/bin/aarch64-linux-gnu-pkg-config | |
android: | |
name: Android | |
uses: ./.github/workflows/build.yaml | |
with: | |
lib-ext: so | |
target: android | |
archive-name: melondsds_libretro-android | |
cmake-args: -DENABLE_OGLRENDERER=OFF -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=24 -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK/build/cmake/android.toolchain.cmake" | |
runs-on: ubuntu-latest | |
# Disabled OpenGL on Android due to https://github.com/JesseTG/melonds-ds/issues/23 | |
ios: | |
name: iOS | |
uses: ./.github/workflows/build.yaml | |
with: | |
runs-on: macos-latest | |
target: ios | |
archive-name: melondsds_libretro-ios | |
info-dir: info | |
lib-ext: dylib | |
cmake-args: --toolchain ./cmake/toolchain/ios.toolchain.cmake -DPLATFORM=OS64 -DDEPLOYMENT_TARGET=14 | |
# Disabled OpenGL on iOS due to https://github.com/JesseTG/melonds-ds/issues/23 | |
tvos: | |
name: tvOS | |
uses: ./.github/workflows/build.yaml | |
with: | |
runs-on: macos-latest | |
target: tvos | |
archive-name: melondsds_libretro-tvos | |
info-dir: info | |
lib-ext: dylib | |
cmake-args: --toolchain ./cmake/toolchain/ios.toolchain.cmake -DPLATFORM=TVOS -DDEPLOYMENT_TARGET=14 | |
# Disabled OpenGL on tvOS due to https://github.com/JesseTG/melonds-ds/issues/23 | |
test-linux-x86_64: | |
name: Test Suite (Linux x86_64) | |
uses: ./.github/workflows/test.yaml | |
needs: [ linux-x86_64 ] | |
with: | |
archive-name: melondsds_libretro-linux-x86_64 | |
target: linux-x86_64 | |
runs-on: ubuntu-latest | |
secrets: | |
TESTFILE_REPO_TOKEN: ${{ secrets.TESTFILE_REPO_TOKEN }} | |
TESTFILE_REPO: ${{ secrets.TESTFILE_REPO }} | |
DSI_NAND_ARCHIVE: ${{ secrets.DSI_NAND_ARCHIVE }} | |
DSI_NAND: ${{ secrets.DSI_NAND }} | |
ARM7_BIOS: ${{ secrets.ARM7_BIOS }} | |
ARM9_BIOS: ${{ secrets.ARM9_BIOS }} | |
ARM7_DSI_BIOS: ${{ secrets.ARM7_DSI_BIOS }} | |
ARM9_DSI_BIOS: ${{ secrets.ARM9_DSI_BIOS }} | |
NDS_FIRMWARE: ${{ secrets.NDS_FIRMWARE }} | |
DSI_FIRMWARE: ${{ secrets.DSI_FIRMWARE }} | |
NDS_ROM: ${{ secrets.NDS_ROM }} | |
release: | |
name: Release Build | |
needs: [ windows, macos, linux-x86_64, linux-aarch64, android, ios, tvos, test-linux-x86_64 ] | |
if: "${{ startsWith(github.ref, 'refs/tags/v') }}" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Out Source | |
uses: actions/checkout@v3 | |
- name: Get Version From Pushed Tag | |
id: tag | |
shell: bash | |
run: echo "version=`echo ${{ github.ref_name }} | cut -c2- `" >> "$GITHUB_OUTPUT" | |
# Strip the v prefix of the pushed tag | |
- name: Get Version From Latest Changelog Entry | |
id: changelog | |
uses: mindsers/changelog-reader-action@v2.2.2 | |
with: | |
validation_level: error | |
- name: Get Version From CMake | |
uses: DarwinInnovation/cmake-project-version-action@v1.0 | |
id: cmake | |
- name: Require Versions to Match | |
if: "${{ !(steps.tag.outputs.version == steps.changelog.outputs.version && steps.tag.outputs.latest == steps.cmake.outputs.version) }}" | |
env: | |
VERSION_TAG: ${{ steps.tag.outputs.version }} | |
VERSION_CHANGELOG: ${{ steps.changelog.outputs.version }} | |
VERSION_CMAKE: ${{ steps.cmake.outputs.version }} | |
run: | | |
echo "::error::Expected the pushed tag, CHANGELOG.md, and CMakeLists.txt to all specify the same version ($VERSION_TAG, $VERSION_CHANGELOG, $VERSION_CMAKE)" | |
exit 1 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
- run: ls -halR | |
- name: Create Release | |
uses: dropseed/changerelease@v1.6.0 | |
with: | |
github_token: ${{ secrets.RELEASE_TOKEN }} |