2
0
Эх сурвалжийг харах

Merge pull request #176 from bmx-ng/task/add-rpi-arm64-weekly

Added rpi arm64 to weekly builds.
Brucey 1 жил өмнө
parent
commit
bedb5cb6a8

+ 58 - 0
.github/workflows/rpi-arm64-weekly.yml

@@ -0,0 +1,58 @@
+name: RaspberryPi arm64 Weekly
+
+on: 
+  schedule:
+    - cron: '55 1 * * 0'
+  workflow_dispatch:
+
+jobs:
+    build:
+      runs-on: ubuntu-latest
+      steps:
+        - name: Checkout code
+          uses: actions/checkout@v3
+
+        - name: Install QEMU
+          uses: docker/setup-qemu-action@v2
+    
+        - name: Build Docker image
+          run: |
+            docker build --platform linux/arm64 -t blitzmax_rpi64_cross_compile -f src/scripts/Dockerfile.rpi64 .
+  
+        - name: Run build script in Docker
+          run: |
+            mkdir -p build
+            cp src/scripts/build_release.sh build
+            docker run -v $GITHUB_WORKSPACE/build:/build -w /build blitzmax_rpi64_cross_compile ./build_release.sh -b 0.139.3.56 -a arm64 -r arm64 -l rpi -p -t -o
+  
+        - name: Populate env variables
+          run: |
+            echo "VERSION_TAG=$(cat build/version-tag.txt)" >> $GITHUB_ENV
+            echo "PACKAGE_NAME=$(cat build/package-name.txt)" >> $GITHUB_ENV
+            echo "PACKAGE_MIME_TYPE=$(cat build/package-mime.txt)" >> $GITHUB_ENV
+
+        - name: Set custom tag
+          id: custom_tag
+          run: |
+            echo "tag=v${{ env.VERSION_TAG }}.rpi.arm64" >> $GITHUB_OUTPUT
+
+        - name: Create Release and Upload Asset
+          uses: softprops/action-gh-release@v1
+          with:
+            tag_name: ${{ steps.custom_tag.outputs.tag }}
+            name: "[weekly] BlitzMax RaspberryPi arm64 v${{ env.VERSION_TAG }}"
+            body: |
+                BlitzMax, RaspberryPi edition, aimed at 64-bit ARM development, with MaxIDE.
+
+                Includes SDL backend, mojo2, Crypto, Audio, Archive, Image, Math, Net, Random, Text and Gtk MaxGUI.
+                
+                ### Installation notes
+                
+                See the [Getting Started Guide](https://blitzmax.org/docs/en/setup/rpi/) at the BlitzMax website.
+
+                *Note: This is a weekly build, and may contain bugs. Use at your own risk.*
+            prerelease: true
+            files: ./build/${{ env.PACKAGE_NAME }}
+          env:
+            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+  

+ 20 - 0
src/scripts/Dockerfile.rpi64

@@ -0,0 +1,20 @@
+FROM arm64v8/debian:bookworm
+
+# Install necessary build tools
+RUN apt-get update && apt-get install -y \
+    build-essential \
+    gcc \
+    g++ \
+    libglu1-mesa-dev \
+    libasound2-dev \
+    libfreetype6-dev \
+    libxpm-dev \
+    libxft-dev \
+    libxxf86vm-dev \
+    libpulse-dev \
+    libopenal-dev \
+    libwebkit2gtk-4.0-dev \
+    libgtk-3-dev \
+    unzip \
+    wget \
+    && rm -rf /var/lib/apt/lists/*