test #22
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: CI | |
on: | |
push: | |
pull_request: | |
repository_dispatch: | |
types: [run_build] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os[0] }} | |
strategy: | |
matrix: | |
os: [[ubuntu-22.04, bash]] | |
fail-fast: false | |
defaults: | |
run: | |
shell: ${{ matrix.os[1] }} {0} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: KrahJohlito/ps2dev | |
ref: 2023-maxudma | |
fetch-depth: 0 | |
- name: Install Ubuntu texinfo bison flex libucl-dev | |
if: matrix.os[0] == 'ubuntu-22.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install texinfo bison flex gettext libgmp3-dev libmpfr-dev libmpc-dev | |
echo "MSYSTEM=x64" >> $GITHUB_ENV | |
- name: Runs all the stages in the shell | |
continue-on-error: true | |
run: | | |
export PS2DEV=$PWD/ps2dev | |
export PS2SDK=$PS2DEV/ps2sdk | |
export GSKIT=$PS2DEV/gsKit | |
export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH" | |
export PATH="/usr/local/opt/bison/bin:$PATH" | |
export PATH=$PATH:$PS2DEV/bin:$PS2DEV/ee/bin:$PS2DEV/iop/bin:$PS2DEV/dvp/bin:$PS2SDK/bin | |
./build-all.sh | |
- name: Get short SHA | |
id: slug | |
run: echo "sha8=${MSYSTEM}-sha[$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT | |
- name: Prepare ps2dev folder | |
run: | | |
tar -zcvf ps2dev-${{matrix.os[0]}}.tar.gz ps2dev | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ps2dev-${{matrix.os[0]}}-${{ steps.slug.outputs.sha8 }} | |
path: ps2dev-${{matrix.os[0]}}.tar.gz | |
- name: Extract tag name | |
if: startsWith(github.ref, 'refs/tags/') | |
id: tag | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
- name: Create pre-release | |
if: github.ref == 'refs/heads/ps2dev-2023-maxudma' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ps2dev-${{matrix.os[0]}}.tar.gz | |
prerelease: true | |
name: "Development build" | |
tag_name: "2023-maxudma" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ps2dev-${{matrix.os[0]}}.tar.gz | |
tag_name: ${{ steps.tag.outputs.VERSION }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |