Skip to content

Work around a bug

Work around a bug #67

Workflow file for this run

name: CMake Build (Linux)
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
BUILD_DIR: "${{github.workspace}}/build"
DIST_DIR: "${{github.workspace}}/build/dist"
jobs:
x86_64:
runs-on: ubuntu-latest
continue-on-error: ${{ !matrix.release }}
strategy:
matrix:
include:
- repo: https://github.com/JesseTG/melonDS.git
commit: c976c3e9
release: true
- repo: https://github.com/melonDS-emu/melonDS.git
commit: master
release: false
# This profile is used to receive advanced notice of breaking changes
env:
ARCHIVE_NAME: "melondsds_libretro-linux-x86_64"
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list /etc/apt/sources.list.d/kubernetes.list
# Don't check for dependencies that we won't use
sudo apt-get update
sudo apt-get install -y cmake libepoxy-dev
- name: Create build environment
run: mkdir --parents "$BUILD_DIR"
- name: Configure
working-directory: "${{ env.BUILD_DIR }}"
run: cmake "$GITHUB_WORKSPACE" -DMELONDS_REPOSITORY_URL:STRING="${{ matrix.repo }}" -DMELONDS_REPOSITORY_TAG:STRING="${{ matrix.commit }}"
- name: Install GCC problem matcher
uses: root-project/gcc-problem-matcher-improved@9d83f12b27a78210f0485fb188e08d94fa807a6d
with:
build-directory: ${{ github.workspace }}
- name: Build
working-directory: "${{ env.BUILD_DIR }}"
run: make -j$(nproc --all)
- name: Prepare Artifact Directory
if: matrix.release
env:
ZIP_ROOT: "${{ env.DIST_DIR }}/cores"
run: |
mkdir --parents "$ZIP_ROOT"
cp --force "$BUILD_DIR/src/libretro/melondsds_libretro.so" "$ZIP_ROOT"
cp --force "${{github.workspace}}/melondsds_libretro.info" "$ZIP_ROOT"
- name: Upload Artifact
uses: actions/upload-artifact@v3
if: matrix.release
with:
name: ${{ env.ARCHIVE_NAME }}
if-no-files-found: error
path: "${{ env.DIST_DIR }}"
aarch64:
runs-on: ubuntu-latest
continue-on-error: ${{ !matrix.release }}
strategy:
matrix:
include:
- repo: https://github.com/JesseTG/melonDS.git
commit: c976c3e9
release: true
- repo: https://github.com/melonDS-emu/melonDS.git
commit: master
release: false
# This profile is used to receive advanced notice of breaking changes
env:
ARCHIVE_NAME: "melondsds_libretro-linux-aarch64"
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo dpkg --add-architecture arm64
sudo sh -c "sed \"s|^deb \([a-z\.:/]*\) \([a-z\-]*\) \(.*\)$|deb [arch=amd64] \1 \2 \3\ndeb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports \2 \3|\" /etc/apt/sources.list > /etc/apt/sources.list.new"
sudo rm -f /etc/apt/sources.list
sudo mv /etc/apt/sources.list{.new,}
sudo apt-get update
sudo apt-get install -y {gcc-10,g++-10}-aarch64-linux-gnu {pkg-config,libepoxy-dev}:arm64 cmake extra-cmake-modules dpkg-dev
- name: Create build environment
run: mkdir --parents "$BUILD_DIR"
- name: Configure
working-directory: "${{ env.BUILD_DIR }}"
env:
CC: aarch64-linux-gnu-gcc-10
CXX: aarch64-linux-gnu-g++-10
run: cmake "$GITHUB_WORKSPACE" -DMELONDS_REPOSITORY_URL:STRING="${{ matrix.repo }}" -DMELONDS_REPOSITORY_TAG:STRING="${{ matrix.commit }}"
- name: Install GCC problem matcher
uses: root-project/gcc-problem-matcher-improved@9d83f12b27a78210f0485fb188e08d94fa807a6d
with:
build-directory: ${{ env.BUILD_DIR }}
- name: Build
working-directory: "${{ env.BUILD_DIR }}"
run: make -j$(nproc --all)
- name: Prepare Artifact Directory
if: matrix.release
env:
ZIP_ROOT: "${{ env.DIST_DIR }}/cores"
run: |
mkdir --parents "$ZIP_ROOT"
cp --force "$BUILD_DIR/src/libretro/melondsds_libretro.so" "$ZIP_ROOT"
cp --force "${{github.workspace}}/melondsds_libretro.info" "$ZIP_ROOT"
- name: Upload Artifact
uses: actions/upload-artifact@v3
if: matrix.release
with:
name: ${{ env.ARCHIVE_NAME }}
if-no-files-found: error
path: "${{ env.DIST_DIR }}"