mirror of
https://github.com/grumpycoders/pcsx-redux.git
synced 2026-10-12 02:15:13 +00:00
60 lines
2.8 KiB
YAML
60 lines
2.8 KiB
YAML
name: Linux CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: grumpycoders/pcsx-redux-build:latest
|
|
env:
|
|
TEST_RESULTS: /tmp/test-results
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
set-safe-directory: true
|
|
- uses: n1hility/cancel-previous-runs@v2
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
- run: |
|
|
make -j 2 all pcsx-redux-tests
|
|
make -C src/mips/tests -j 2 PCSX_TESTS=true
|
|
make -C src/mips/openbios -j 2 clean all
|
|
- name: Packaging
|
|
run: |
|
|
make install install-openbios DESTDIR=AppDir/usr
|
|
echo '{' > AppDir/usr/share/pcsx-redux/resources/version.json
|
|
echo ' "version": "'`git rev-parse HEAD | cut -c 1-8`'",' >> AppDir/usr/share/pcsx-redux/resources/version.json
|
|
echo ' "changeset": "'`git rev-parse HEAD`'",' >> AppDir/usr/share/pcsx-redux/resources/version.json
|
|
echo ' "timestamp": '`date '+%s'`',' >> AppDir/usr/share/pcsx-redux/resources/version.json
|
|
echo ' "channel": "dev",' >> AppDir/usr/share/pcsx-redux/resources/version.json
|
|
echo ' "updateInfo": [' >> AppDir/usr/share/pcsx-redux/resources/version.json
|
|
echo ' {' >> AppDir/usr/share/pcsx-redux/resources/version.json
|
|
echo ' "channel": "dev",' >> AppDir/usr/share/pcsx-redux/resources/version.json
|
|
echo ' "method": "appcenter",' >> AppDir/usr/share/pcsx-redux/resources/version.json
|
|
echo ' "updateCatalog": "https://install.appcenter.ms/api/v0.1/apps/grumpycoders/pcsx-redux-linux64/distribution_groups/public/public_releases",' >> AppDir/usr/share/pcsx-redux/resources/version.json
|
|
echo ' "updateInfoBase": "https://install.appcenter.ms/api/v0.1/apps/grumpycoders/pcsx-redux-linux64/distribution_groups/public/releases/"' >> AppDir/usr/share/pcsx-redux/resources/version.json
|
|
echo ' }' >> AppDir/usr/share/pcsx-redux/resources/version.json
|
|
echo ' ]' >> AppDir/usr/share/pcsx-redux/resources/version.json
|
|
echo '}' >> AppDir/usr/share/pcsx-redux/resources/version.json
|
|
appimage-builder --skip-tests
|
|
- name: Test
|
|
run: |
|
|
export GTEST_OUTPUT=xml:${TEST_RESULTS}/
|
|
mkdir -p $TEST_RESULTS
|
|
xvfb-run catchsegv ./pcsx-redux-tests
|
|
- name: Deploy
|
|
if: github.event_name == 'push'
|
|
env:
|
|
APPCENTER_ACCESS_TOKEN: ${{ secrets.LINUX_APPCENTER_ACCESS_TOKEN }}
|
|
run: |
|
|
. /usr/local/nvm/nvm.sh
|
|
export BUILD=`git rev-parse HEAD | cut -c 1-8`
|
|
zip PCSX-Redux-$BUILD-linux-x86_64.zip *.AppImage
|
|
appcenter distribute release -b $BUILD -f PCSX-Redux-$BUILD-linux-x86_64.zip -g public -a grumpycoders/pcsx-redux-linux64 --disable-telemetry
|