Fix debugging #45
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: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [run_build] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
debug: [all, debug] | |
runs-on: ubuntu-latest | |
container: ps2dev/ps2toolchain:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
apk add build-base git bash | |
- name: Compile project ${{ matrix.debug }} | |
run: | | |
make -j $(getconf _NPROCESSORS_ONLN) clean | |
make -j $(getconf _NPROCESSORS_ONLN) ${{ matrix.debug }} | |
make -j $(getconf _NPROCESSORS_ONLN) install | |
# Create symbolink links using relative paths | |
(cd $PS2DEV/ee/mips64r5900el-ps2-elf/lib && ln -sf ../../../ps2sdk/ee/lib/libcglue.a libcglue.a && cd -) | |
(cd $PS2DEV/ee/mips64r5900el-ps2-elf/lib && ln -sf ../../../ps2sdk/ee/lib/libpthreadglue.a libpthreadglue.a && cd -) | |
(cd $PS2DEV/ee/mips64r5900el-ps2-elf/lib && ln -sf ../../../ps2sdk/ee/lib/libprofglue.a libprofglue.a && cd -) | |
(cd $PS2DEV/ee/mips64r5900el-ps2-elf/lib && ln -sf ../../../ps2sdk/ee/lib/libkernel.a libkernel.a && cd -) | |
(cd $PS2DEV/ee/mips64r5900el-ps2-elf/lib && ln -sf ../../../ps2sdk/ee/lib/libcdvd.a libcdvd.a && cd -) | |
- name: Compile samples | |
if: ${{ success() }} | |
run: | | |
cp -rv $PS2SDK/samples ~/ | |
make -C ~/samples | |
- name: Get short SHA | |
id: slug | |
run: printf '%s\n' "sha8=$(printf '%s\n' ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT | |
- name: Upload artifacts | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ps2sdk-samples-${{ matrix.debug }}-${{ steps.slug.outputs.sha8 }} | |
path: ~/samples |