From ffc1626261bd31ff70a00d9a8b3dede37e09c04b Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sun, 18 Feb 2024 09:03:04 +1100 Subject: [PATCH] RPI build workflows --- .github/workflows/build_rpi32.yml | 43 +++++++++++++++++++++++++++++++ .github/workflows/build_rpi64.yml | 43 +++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 .github/workflows/build_rpi32.yml create mode 100644 .github/workflows/build_rpi64.yml diff --git a/.github/workflows/build_rpi32.yml b/.github/workflows/build_rpi32.yml new file mode 100644 index 000000000..3fd48839e --- /dev/null +++ b/.github/workflows/build_rpi32.yml @@ -0,0 +1,43 @@ +name: Build latest (RPI 32 bit) +on: [push] + +concurrency: + group: ${{ github.ref }}-rpi32 + cancel-in-progress: true + +jobs: + build-RPI32: + if: github.ref_name == github.event.repository.default_branch + runs-on: ubuntu-latest + container: + image: dockcross/linux-armv6-lts + steps: + - uses: actions/checkout@v3 + - name: Retrieve OpenGL and X11 dev files + run: | + mkdir src/rpi + cd src/rpi + wget https://github.com/ClassiCube/rpi-compiling-stuff/raw/main/rpi32.zip + unzip rpi32.zip + - name: Compile RPI 32 bit build + id: compile + env: + COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn" + RPI32_FLAGS: "-fvisibility=hidden -rdynamic -DCC_BUILD_ICON -DCC_BUILD_RPI -I rpi/include -L rpi/lib -Wl,--unresolved-symbols=ignore-in-shared-libs" + run: | + LATEST_FLAG=-DCC_COMMIT_SHA=\"$GITHUB_SHA\" + + cd src + $CC *.c ${{ env.COMMON_FLAGS }} ${{ env.RPI32_FLAGS }} $LATEST_FLAG -o cc-rpi32 -lGLESv2 -lEGL -lX11 -lXi -lm -lpthread -ldl -lrt + + - uses: ./.github/actions/notify_failure + if: ${{ always() && steps.compile.outcome == 'failure' }} + with: + NOTIFY_MESSAGE: 'Failed to compile RPI 32 bit build' + WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' + + - uses: ./.github/actions/upload_build + if: ${{ always() && steps.compile.outcome == 'success' }} + with: + SOURCE_FILE: 'src/cc-rpi32' + DEST_NAME: 'cc-rpi32' \ No newline at end of file diff --git a/.github/workflows/build_rpi64.yml b/.github/workflows/build_rpi64.yml new file mode 100644 index 000000000..3161bd202 --- /dev/null +++ b/.github/workflows/build_rpi64.yml @@ -0,0 +1,43 @@ +name: Build latest (RPI 64 bit) +on: [push] + +concurrency: + group: ${{ github.ref }}-rpi64 + cancel-in-progress: true + +jobs: + build-RPI64: + if: github.ref_name == github.event.repository.default_branch + runs-on: ubuntu-latest + container: + image: dockcross/linux-arm64-lts + steps: + - uses: actions/checkout@v3 + - name: Retrieve OpenGL and X11 dev files + run: | + mkdir src/rpi + cd src/rpi + wget https://github.com/ClassiCube/rpi-compiling-stuff/raw/main/rpi64.zip + unzip rpi64.zip + - name: Compile RPI 64 bit build + id: compile + env: + COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn" + RPI64_FLAGS: "-fvisibility=hidden -rdynamic -DCC_BUILD_ICON -DCC_BUILD_RPI -I rpi/include -L rpi/lib -Wl,--unresolved-symbols=ignore-in-shared-libs" + run: | + LATEST_FLAG=-DCC_COMMIT_SHA=\"$GITHUB_SHA\" + + cd src + $CC *.c ${{ env.COMMON_FLAGS }} ${{ env.RPI64_FLAGS }} $LATEST_FLAG -o cc-rpi64 -lGLESv2 -lEGL -lX11 -lXi -lm -lpthread -ldl -lrt + + - uses: ./.github/actions/notify_failure + if: ${{ always() && steps.compile.outcome == 'failure' }} + with: + NOTIFY_MESSAGE: 'Failed to compile RPI 64 bit build' + WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' + + - uses: ./.github/actions/upload_build + if: ${{ always() && steps.compile.outcome == 'success' }} + with: + SOURCE_FILE: 'src/cc-rpi64' + DEST_NAME: 'cc-rpi64' \ No newline at end of file