-
Notifications
You must be signed in to change notification settings - Fork 18
66 lines (55 loc) · 1.51 KB
/
compilation.yml
File metadata and controls
66 lines (55 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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: 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