From e28c1a7cde66165cdbe4c795e045e3cdeb7c5a51 Mon Sep 17 00:00:00 2001 From: alice Date: Thu, 2 May 2024 18:29:09 +0100 Subject: [PATCH] Build for linux/arm64 with self-hosted runners --- .github/workflows/build.yml | 79 ++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1964e611a..57f731ff1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -239,6 +239,82 @@ jobs: name: "tic80-linux" path: build/bin/tic80 + # === Linux arm64 === + linux-arm64: + runs-on: linux-arm64-alice + container: dtcooper/raspberrypi-os:bookworm + + steps: + - name: Install Host toolchain + run: | + apt update + apt -y install cmake build-essential git doxygen libglu1-mesa-dev freeglut3-dev libpipewire-0.3-dev libwayland-dev libsdl2-dev ruby-dev libcurl4-openssl-dev + + - uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + + - name: Build + run: | + cd build + # this is a self-hosted runner issue + # fixes "fatal: detected dubious ownership in repository" + git config --global --add safe.directory '*' + cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_STUB=On -DBUILD_SDLGPU=On .. + cmake --build . --config $BUILD_TYPE --parallel 2 + cpack + + - name: Deploy DEB + uses: actions/upload-artifact@v3 + with: + name: "tic80-linux-arm64-deb" + path: build/tic80.deb + + - name: Deploy + uses: actions/upload-artifact@v3 + with: + name: "tic80-linux-arm64" + path: build/bin/tic80 + + # === Linux PRO arm64 === + linux-arm64-pro: + runs-on: linux-arm64-alice + container: dtcooper/raspberrypi-os:bookworm + + steps: + - name: Install Host toolchain + run: | + apt update + apt -y install cmake build-essential git doxygen libglu1-mesa-dev freeglut3-dev libpipewire-0.3-dev libwayland-dev libsdl2-dev ruby-dev libcurl4-openssl-dev + + - uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + + - name: Build + run: | + cd build + # this is a self-hosted runner issue + # fixes "fatal: detected dubious ownership in repository" + git config --global --add safe.directory '*' + cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_PRO=On -DBUILD_SDLGPU=On .. + cmake --build . --config $BUILD_TYPE --parallel 2 + cpack + + - name: Deploy DEB + uses: actions/upload-artifact@v3 + with: + name: "tic80-linux-arm64-deb-pro" + path: build/tic80.deb + + - name: Deploy + uses: actions/upload-artifact@v3 + with: + name: "tic80-linux-arm64-pro" + path: build/bin/tic80 + # === Raspberry PI === rpi: runs-on: ubuntu-latest @@ -266,7 +342,7 @@ jobs: - name: Deploy DEB uses: actions/upload-artifact@v3 with: - name: "tic80-rpi-dep" + name: "tic80-rpi-deb" path: build/tic80.deb - name: Deploy @@ -661,4 +737,3 @@ jobs: build/webapp/tic80.webmanifest build/webapp/tic80.js build/webapp/tic80.wasm -