aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2026-01-17 16:27:41 -0500
committerGitHub <noreply@github.com>2026-01-17 16:27:41 -0500
commit059ae5d44c49a7b97226bc9d17cb573c637226d8 (patch)
tree9050d4e8ef903cd3387c0f73e7d10b0db51d61fe /.github
parentDo not compile tools with LTO (diff)
downloadpokeyellow-059ae5d44c49a7b97226bc9d17cb573c637226d8.tar.gz
pokeyellow-059ae5d44c49a7b97226bc9d17cb573c637226d8.tar.xz
pokeyellow-059ae5d44c49a7b97226bc9d17cb573c637226d8.zip
Fix CI for Linux and add CI for macOS (#567)
Diffstat (limited to '.github')
-rwxr-xr-x.github/checkdiff.sh8
-rw-r--r--.github/workflows/main.yml71
2 files changed, 59 insertions, 20 deletions
diff --git a/.github/checkdiff.sh b/.github/checkdiff.sh
new file mode 100755
index 00000000..430aba4d
--- /dev/null
+++ b/.github/checkdiff.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+if ! git diff-index --quiet HEAD --; then
+ echo 'Uncommitted changes detected:'
+ git diff-index HEAD --
+ return 1
+fi
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d2c152ad..3ea44236 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -5,25 +5,29 @@ on:
branches: [ master ]
pull_request:
+env:
+ rgbds_version: v1.0.1
+
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@master
+ uses: actions/checkout@v6
- name: Checkout rgbds
- uses: actions/checkout@master
+ uses: actions/checkout@v6
with:
path: rgbds
- ref: v1.0.1
+ ref: ${{ env.rgbds_version }}
repository: gbdev/rgbds
- name: Install rgbds
working-directory: rgbds
run: |
- sudo apt-get install -yq libpng-dev
- sudo make install
+ sudo apt-get update
+ sudo apt-get install -yq bison libpng-dev pkg-config
+ sudo make -j$(nproc) install
- name: Remove rgbds
run: |
@@ -33,39 +37,66 @@ jobs:
if: ${{ github.repository_owner == 'pret' }}
run: |
make DEBUG=1 -j$(nproc) compare
- if ! git diff-index --quiet HEAD --; then
- echo 'Uncommitted changes detected:'
- git diff-index HEAD --
- return 1
- fi
+ .github/checkdiff.sh
- name: Make
if: ${{ github.repository_owner != 'pret' }}
run: |
make -j$(nproc)
- if ! git diff-index --quiet HEAD --; then
- echo 'Uncommitted changes detected:'
- git diff-index HEAD --
- return 1
- fi
+ .github/checkdiff.sh
- name: Checkout symbols
- if: ${{ github.event_name == 'push' && github.repository_owner == 'pret' }}
+ if: ${{ github.repository_owner == 'pret' && github.event_name == 'push' }}
uses: actions/checkout@master
with:
path: symbols
ref: symbols
- name: Move symbols
- if: ${{ github.event_name == 'push' && github.repository_owner == 'pret' }}
+ if: ${{ github.repository_owner == 'pret' && github.event_name == 'push' }}
run: |
- cp -v *.sym symbols/
- cp -v *.map symbols/
+ cp -v *.sym *.map symbols/
- name: Update symbols
- if: ${{ github.event_name == 'push' && github.repository_owner == 'pret' }}
+ if: ${{ github.repository_owner == 'pret' && github.event_name == 'push' }}
uses: EndBug/add-and-commit@v9
with:
cwd: "./symbols"
add: "*.sym *.map"
message: ${{ github.event.commits[0].message }}
+
+ build-macos:
+ runs-on: macos-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+
+ - name: Checkout rgbds
+ uses: actions/checkout@v6
+ with:
+ path: rgbds
+ ref: ${{ env.rgbds_version }}
+ repository: gbdev/rgbds
+
+ - name: Install rgbds
+ working-directory: rgbds
+ run: |
+ brew install bison libpng pkg-config
+ export PATH="$(brew --prefix bison)/bin:$PATH"
+ sudo make -j$(sysctl -n hw.ncpu) install
+
+ - name: Remove rgbds
+ run: |
+ rm -rf rgbds
+
+ - name: Compare
+ if: ${{ github.repository_owner == 'pret' }}
+ run: |
+ make DEBUG=1 -j$(sysctl -n hw.ncpu) compare
+ .github/checkdiff.sh
+
+ - name: Make
+ if: ${{ github.repository_owner != 'pret' }}
+ run: |
+ make -j$(sysctl -n hw.ncpu)
+ .github/checkdiff.sh