-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
204 additions
and
71 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,224 @@ | ||
name: Geargrafx CI | ||
name: Main Workflow | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * 0' | ||
|
||
env: | ||
NAME_LOWER: geargrafx | ||
NAME_UPPER: Geargrafx | ||
|
||
jobs: | ||
linux: | ||
name: Linux | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04, ubuntu-20.04] | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Update OS | ||
run: sudo apt-get update -qq | ||
- name: Install dependencies | ||
run: sudo apt-get install -y libsdl2-dev libglew-dev | ||
run: sudo apt-get install -y libsdl2-dev libglew-dev libgtk-3-dev | ||
- name: Get build number | ||
run: | | ||
echo "BUILD_NUMBER=$(git describe --abbrev=7 --dirty --always --tags)" >> $GITHUB_ENV | ||
- name: make | ||
run: make | ||
working-directory: platforms/linux | ||
# libretro: | ||
# name: Libretro (Ubuntu) | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: make | ||
# run: make | ||
# working-directory: platforms/libretro | ||
# macos: | ||
# name: macOS | ||
# runs-on: macOS-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: Install dependencies | ||
# run: brew install sdl2 | ||
# - name: make | ||
# run: make dist | ||
# working-directory: platforms/macos | ||
# - name: Archive binary | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: macOS App bundle | ||
# path: platforms/macos/Geargrafx.app | ||
# windows: | ||
# name: Windows | ||
# runs-on: windows-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: Add msbuild to PATH | ||
# uses: microsoft/[email protected] | ||
# - name: Get git version | ||
# id: gitversion | ||
# run: echo "::set-output name=gitversion::$(git describe --abbrev=7 --dirty --always --tags)" | ||
# - name: msbuild | ||
# run: msbuild Geargrafx.sln /t:Clean,Build /p:EmulatorBuild="${{ steps.gitversion.outputs.gitversion }}" /p:Configuration=Release | ||
# working-directory: platforms/windows | ||
# - name: Archive binary | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: Windows binary | ||
# path: platforms/windows/release/Geargrafx.exe | ||
# bsd: | ||
# name: FreeBSD | ||
# runs-on: macos-12 | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: make | ||
# id: test | ||
# uses: vmactions/freebsd-vm@v0 | ||
# with: | ||
# usesh: true | ||
# prepare: pkg install -y git gmake pkgconf SDL2 glew lang/gcc | ||
# run: | | ||
# cd platforms/bsd | ||
# gmake | ||
- name: Prepare artifact directory | ||
run: | | ||
mkdir -p artifact | ||
cp platforms/README.txt artifact | ||
cp platforms/gamecontrollerdb.txt artifact | ||
cp platforms/linux/${{ env.NAME_LOWER }} artifact | ||
- name: Archive binary | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.NAME_UPPER }}-${{ env.BUILD_NUMBER }}-${{ matrix.os }} | ||
path: artifact/* | ||
# libretro: | ||
# name: Libretro (ubuntu) | ||
# runs-on: ubuntu-latest | ||
# permissions: | ||
# contents: read | ||
# packages: write | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: Get build number | ||
# run: | | ||
# echo "BUILD_NUMBER=$(git describe --abbrev=7 --dirty --always --tags)" >> $GITHUB_ENV | ||
# - name: make | ||
# run: make | ||
# working-directory: platforms/libretro | ||
# - name: Archive binary | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: ${{ env.NAME_UPPER }}-${{ env.BUILD_NUMBER }}-libretro-linux | ||
# path: platforms/libretro/${{ env.NAME_LOWER }}_libretro.so | ||
# macos: | ||
# name: macOS | ||
# strategy: | ||
# matrix: | ||
# os: [macos-13, macos-14] | ||
# include: | ||
# - os: macos-13 | ||
# architecture: intel | ||
# - os: macos-14 | ||
# architecture: arm | ||
# runs-on: ${{ matrix.os }} | ||
# permissions: | ||
# contents: read | ||
# packages: write | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: Install dependencies | ||
# run: brew install sdl2 | ||
# - name: Get build number | ||
# run: | | ||
# echo "BUILD_NUMBER=$(git describe --abbrev=7 --dirty --always --tags)" >> $GITHUB_ENV | ||
# - name: make | ||
# run: make dist | ||
# working-directory: platforms/macos | ||
# - name: Prepare artifact directory | ||
# run: | | ||
# mkdir -p artifact | ||
# cp platforms/README.txt artifact | ||
# cp platforms/gamecontrollerdb.txt artifact | ||
# cp -R platforms/macos/${{ env.NAME_UPPER }}.app artifact | ||
# - name: Archive binary | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: ${{ env.NAME_UPPER }}-${{ env.BUILD_NUMBER }}-macos-${{ matrix.architecture }} | ||
# path: artifact/* | ||
# windows: | ||
# name: Windows | ||
# strategy: | ||
# matrix: | ||
# architecture: [x64, arm64] | ||
# runs-on: windows-latest | ||
# permissions: | ||
# contents: read | ||
# packages: write | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: Setup msbuild | ||
# uses: microsoft/setup-msbuild@v2 | ||
# - name: Get build number | ||
# shell: bash | ||
# run: | | ||
# echo "BUILD_NUMBER=$(git describe --abbrev=7 --dirty --always --tags)" >> $GITHUB_ENV | ||
# - name: msbuild | ||
# run: msbuild ${{ env.NAME_UPPER }}.sln /t:Clean,Build /p:EmulatorBuild="${{ env.BUILD_NUMBER }}" /p:Configuration=Release /p:Platform=${{ matrix.architecture }} | ||
# working-directory: platforms/windows | ||
# - name: Prepare artifact directory | ||
# run: | | ||
# mkdir -p artifact | ||
# cp platforms/README.txt artifact | ||
# cp platforms/gamecontrollerdb.txt artifact | ||
# cp platforms/windows/dependencies/glew-2.2.0/bin/Release/${{ matrix.architecture }}/glew32.dll artifact | ||
# cp platforms/windows/dependencies/SDL2-2.28.5/lib/${{ matrix.architecture }}/SDL2.dll artifact | ||
# cp platforms/windows/release/${{ env.NAME_UPPER }}.exe artifact | ||
# - name: Archive binary | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: ${{ env.NAME_UPPER }}-${{ env.BUILD_NUMBER }}-windows-${{ matrix.architecture }} | ||
# path: artifact/* | ||
# bsd: | ||
# name: BSD | ||
# runs-on: ubuntu-latest | ||
# permissions: | ||
# contents: read | ||
# packages: write | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: Get build number | ||
# run: | | ||
# echo "BUILD_NUMBER=$(git describe --abbrev=7 --dirty --always --tags)" >> $GITHUB_ENV | ||
# - name: Run FreeBSD and gmake | ||
# id: test | ||
# uses: vmactions/freebsd-vm@v1 | ||
# with: | ||
# usesh: true | ||
# prepare: pkg install -y git gmake pkgconf SDL2 glew lang/gcc gtk3 | ||
# run: | | ||
# cd platforms/bsd | ||
# gmake | ||
# - name: Prepare artifact directory | ||
# run: | | ||
# mkdir -p artifact | ||
# cp platforms/README.txt artifact | ||
# cp platforms/gamecontrollerdb.txt artifact | ||
# cp platforms/bsd/${{ env.NAME_LOWER }} artifact | ||
# - name: Archive binary | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: ${{ env.NAME_UPPER }}-${{ env.BUILD_NUMBER }}-bsd | ||
# path: artifact/* | ||
# release: | ||
# name: Release | ||
# needs: [linux, macos, windows, bsd] | ||
# if: github.event_name != 'pull_request' && startswith(github.ref, 'refs/tags/') | ||
# runs-on: ubuntu-latest | ||
# permissions: | ||
# contents: write | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: 0 | ||
# - name: Get build number | ||
# run: | | ||
# echo "BUILD_NUMBER=$(git describe --abbrev=7 --dirty --always --tags)" >> $GITHUB_ENV | ||
# - name: Prepare release directory | ||
# run: | | ||
# mkdir -p release | ||
# - name: Download artifacts | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# pattern: ${{ env.NAME_UPPER }}-${{ env.BUILD_NUMBER }}-* | ||
# path: release | ||
# - name: Zip directories | ||
# run: | | ||
# cd release | ||
# for f in *; do | ||
# if [ -d "$f" ]; then | ||
# cd $f | ||
# echo "Compressing $f" | ||
# zip -r $f.zip * | ||
# mv $f.zip ../ | ||
# cd .. | ||
# fi | ||
# done | ||
# - name: Create release | ||
# run: | | ||
# gh release create ${{ github.ref_name }} ./release/*.zip \ | ||
# --title "${{ env.NAME_UPPER }} ${{ github.ref_name }}" \ | ||
# --draft \ | ||
# --generate-notes | ||
# env: | ||
# GITHUB_TOKEN: ${{ github.TOKEN }} |