Skip to content

Migrating to cmake #105

Migrating to cmake

Migrating to cmake #105

Workflow file for this run

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 bash
# Create /bin/bash symlink if it doesn't exist (Alpine installs to /usr/bin/bash)
[ -f /bin/bash ] || ln -s /usr/bin/bash /bin/bash
- 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: Compile masp
run: |
git clone https://github.com/fjtrujy/masp.git
cd masp
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$PS2DEV"
cmake --build build -j $(getconf _NPROCESSORS_ONLN)
cmake --install build
- name: Install openvcl
run: |
git clone https://github.com/fjtrujy/openvcl.git
cd openvcl
git checkout ps2gl
make -j $(getconf _NPROCESSORS_ONLN) clean
make -j $(getconf _NPROCESSORS_ONLN)
make -j $(getconf _NPROCESSORS_ONLN) 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