Browse Source

try to build rom with github actions

Thomas B 1 month ago
parent
commit
36db7bc1c8
2 changed files with 49 additions and 0 deletions
  1. 47
    0
      .github/workflows/build.yml
  2. 2
    0
      README.md

+ 47
- 0
.github/workflows/build.yml View File

1
+name: rom
2
+
3
+# build for each push and pull request
4
+on: [push, pull_request]
5
+
6
+jobs:
7
+  build:
8
+    runs-on: ubuntu-latest
9
+
10
+    permissions:
11
+      contents: write
12
+
13
+    steps:
14
+      - name: Install dependencies
15
+        working-directory: ${{github.workspace}}
16
+        shell: bash
17
+        run: |
18
+          wget https://github.com/gbdk-2020/gbdk-2020/releases/download/4.4.0/gbdk-linux64.tar.gz
19
+          tar -xzf gbdk-linux64.tar.gz
20
+
21
+      - name: Checkout repo
22
+        uses: actions/checkout@v4
23
+        with:
24
+          path: repo
25
+          fetch-depth: 0
26
+
27
+      - name: Get core count
28
+        id: core_count
29
+        run : cat /proc/cpuinfo  | grep processor | wc -l
30
+
31
+      - name: Build
32
+        working-directory: ${{github.workspace}}/repo
33
+        shell: bash
34
+        run: make GBDK_HOME=${{github.workspace}}/gbdk GBDK_RELEASE=1 clean all -j $(nproc)
35
+
36
+      - name: Upload a Build Artifact
37
+        uses: actions/upload-artifact@v4.0.0
38
+        with:
39
+          name: duality.gb
40
+          path: ${{github.workspace}}/repo/duality.gb
41
+          if-no-files-found: error
42
+
43
+      - name: Upload release files
44
+        if: startsWith(github.ref, 'refs/tags/')
45
+        uses: softprops/action-gh-release@v1
46
+        with:
47
+          files: ${{github.workspace}}/repo/duality.gb

+ 2
- 0
README.md View File

1
 # Duality
1
 # Duality
2
 
2
 
3
+![ROM](https://github.com/xythobuz/Duality/actions/workflows/build.yml/badge.svg)
4
+
3
 My first homebrew GameBoy game.
5
 My first homebrew GameBoy game.
4
 A port of the GTA San Andreas Arcade Game Duality.
6
 A port of the GTA San Andreas Arcade Game Duality.
5
 
7
 

Loading…
Cancel
Save