Migrating to cmake
#83
This file contains hidden or 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] | |
| workflow_dispatch: {} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: ps2dev/ps2sdk:latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup dependencies | |
| run: | | |
| apk update | |
| apk add cmake build-base git make | |
| - name: Install ps2stuff | |
| run: | | |
| git clone https://github.com/ps2dev/ps2stuff.git | |
| cd ps2stuff | |
| git checkout cmake | |
| mkdir build | |
| cd build | |
| cmake .. | |
| make -j $(getconf _NPROCESSORS_ONLN) | |
| make install | |
| - name: Configure with CMake | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -DBUILD_GLUT=ON -DBUILD_EXAMPLES=ON .. | |
| - name: Build project with CMake | |
| run: | | |
| cd build | |
| make -j $(getconf _NPROCESSORS_ONLN) | |
| - name: Install libraries | |
| run: | | |
| cd build | |
| make -j $(getconf _NPROCESSORS_ONLN) install | |
| - name: Get short SHA | |
| id: slug | |
| run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT | |
| - name: Upload artifacts | |
| if: ${{ success() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ps2gl-examples-${{ steps.slug.outputs.sha8 }} | |
| path: | | |
| build/examples/*.elf | |
| build/examples/*.gl | |
| build/examples/*.rtx | |
| build/examples/*.bin |