Skip to content

Merge pull request #1667 from njfox/luajit_ldflags #4010

Merge pull request #1667 from njfox/luajit_ldflags

Merge pull request #1667 from njfox/luajit_ldflags #4010

Workflow file for this run

name: macOS CI
on:
push:
branches:
- main
pull_request:
jobs:
build-openbios:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
set-safe-directory: true
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update packages
run: sudo apt-get update
- name: Install dependencies
run: sudo apt-get install -y g++-mipsel-linux-gnu
- name: Build OpenBIOS
run: make -C src/mips/openbios -j2
- name: Upload results for MacOS build job
uses: actions/upload-artifact@v4
with:
name: OpenBIOS
path: src/mips/openbios/openbios.bin
- name: Build tests
run: |
make -C src/mips/openbios -j 2 clean
make -C src/mips/tests -j 2 PCSX_TESTS=true
- name: Upload results for MacOS build job
uses: actions/upload-artifact@v4
with:
name: tests
path: '**/*.ps-exe'
macos-build-and-test:
runs-on: macos-12
needs: build-openbios
steps:
- uses: actions/checkout@v1
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: ./.github/scripts/install-brew-dependencies.sh
- name: Fetch submodules
run: git submodule update --init --recursive
- name: Build PCSX-Redux
run: make -j 2 all pcsx-redux-tests
- name: Download OpenBIOS build
uses: actions/download-artifact@v4
with:
name: OpenBIOS
- name: Download mips tests
uses: actions/download-artifact@v4
with:
name: tests
- name: Bundle
run: ./.github/scripts/create-app.sh
- name: Create BUILD environment
run: echo "BUILD=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Injecting OpenBIOS
run: cp openbios.bin PCSX-Redux.app/Contents/Resources/share/pcsx-redux/resources
- name: Packaging
run: |
echo '{' > version.json
echo ' "version": "'`git rev-parse HEAD | cut -c 1-8`'",' >> version.json
echo ' "changeset": "'`git rev-parse HEAD`'",' >> version.json
echo ' "timestamp": '`date '+%s'`',' >> version.json
echo ' "channel": "dev",' >> version.json
echo ' "updateInfo": [' >> version.json
echo ' {' >> version.json
echo ' "channel": "dev",' >> version.json
echo ' "method": "appcenter",' >> version.json
echo ' "updateCatalog": "https://install.appcenter.ms/api/v0.1/apps/grumpycoders/pcsx-redux-macos/distribution_groups/public/public_releases",' >> version.json
echo ' "updateInfoBase": "https://install.appcenter.ms/api/v0.1/apps/grumpycoders/pcsx-redux-macos/distribution_groups/public/releases/"' >> version.json
echo ' }' >> version.json
echo ' ]' >> version.json
echo '}' >> version.json
cp version.json PCSX-Redux.app/Contents/Resources/share/pcsx-redux/resources/version.json
- name: Signing Application
run: codesign --force -s - -vvvv PCSX-Redux.app
- name: Adjusting for dmg folder
run: |
mkdir dmgdir
mv PCSX-Redux.app dmgdir
cp dmgdir/PCSX-Redux.app/Contents/Resources/AppIcon.icns .
- name: Creating dmg icon
run: |
sips -i AppIcon.icns
DeRez -only icns AppIcon.icns > icns.rsrc
cp AppIcon.icns dmgdir/.VolumeIcon.icns
SetFile -c icnC dmgdir/.VolumeIcon.icns
SetFile -a C dmgdir
- name: Creating Application link
run: ln -s /Applications dmgdir
- name: Creating dmg file
run: hdiutil create -volname PCSX-Redux-$BUILD -srcfolder dmgdir -ov -format UDZO PCSX-Redux-$BUILD-Intel.dmg
- name: Applying icon to dmg file
run: |
Rez -append icns.rsrc -o PCSX-Redux-$BUILD-Intel.dmg
SetFile -a C PCSX-Redux-$BUILD-Intel.dmg
- name: Removing temporary dmg folder
run: rm -rf dmgdir
- name: Upload DMG
uses: actions/upload-artifact@v4
with:
name: Dmg
path: '**/*.dmg'
- name: Upload version
uses: actions/upload-artifact@v4
with:
name: Version
path: version.json
publish-app:
runs-on: ubuntu-latest
needs: macos-build-and-test
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v1
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 'latest'
- name: Create BUILD environment
run: echo "BUILD=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Download DMG
uses: actions/download-artifact@v4
with:
name: Dmg
- name: Download version
uses: actions/download-artifact@v4
with:
name: Version
- name: Distribute app
env:
APPDISTRIB_TOKEN: ${{ secrets.APPDISTRIB_DEV_MACOS_X64 }}
APPDISTRIB_ORGANIZATION: pcsx-redux
APPDISTRIB_PROJECT: dev-macos-x64
APPCENTER_ACCESS_TOKEN: ${{ secrets.MACOS_APPCENTER_ACCESS_TOKEN }}
run: |
npx appcenter-cli distribute release -n 0 -b $BUILD -f PCSX-Redux-$BUILD-Intel.dmg -g 'Public' -a grumpycoders/pcsx-redux-macos --disable-telemetry
npx @appdistrib/cli -m version.json upload PCSX-Redux-$BUILD-Intel.dmg