Merge pull request #1711 from tiopex/next

Actions: CI improvements
This commit is contained in:
tiopex
2025-07-26 22:53:58 +02:00
committed by GitHub
12 changed files with 249 additions and 169 deletions

View File

@@ -51,15 +51,10 @@ jobs:
with:
fetch-depth: 0
- name: Retrieve ccache aarch64
id: retrieve-cache
uses: actions/cache/restore@v4
with:
path: ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
key: ccache-aarch64-${{ inputs.DEVICE }}-emu-libretro-${{ github.sha }}
restore-keys: |
ccache-aarch64-${{ inputs.DEVICE }}-emu-libretro-${{ github.sha }}
ccache-aarch64-${{ inputs.DEVICE }}-emu-libretro-
- name: Retrieve ccache
run: |
URL="https://github.com/${{ github.repository_owner }}/distribution-cache/releases/download/ccache/ccache-aarch64-${{ inputs.DEVICE }}-emu-libretro.tar"
curl -L --fail --silent --show-error "$URL" | tar -xvf - || echo "Cache archive not found, skipping."
- name: Download aarch64 (${{ inputs.DEVICE }})
uses: actions/download-artifact@v4
@@ -77,6 +72,22 @@ jobs:
- name: Clean up compressed aarch64 file
run: rm build.aarch64.tar
- name: Download build aarch64 (${{ inputs.DEVICE }})
uses: actions/download-artifact@v4
with:
name: aarch64 build (${{ inputs.DEVICE }})
- name: Extract artifact aarch64 build
uses: corrupt952/actions-retry-command@v1.0.7
with:
command: |
tar -xf build.build.aarch64.tar
max_attempts: 3
retry_interval: 10
- name: Clean up compressed aarch64 file
run: rm build.build.aarch64.tar
- name: Download qt6 (${{ inputs.DEVICE }})
if: ${{ inputs.DEVICE == 'RK3399' || inputs.DEVICE == 'RK3566' || inputs.DEVICE == 'RK3588' || inputs.DEVICE == 'S922X' || inputs.DEVICE == 'SM8250' || inputs.DEVICE == 'SM8550' }}
uses: actions/download-artifact@v4
@@ -85,8 +96,12 @@ jobs:
- name: Extract artifact qt6
if: ${{ inputs.DEVICE == 'RK3399' || inputs.DEVICE == 'RK3566' || inputs.DEVICE == 'RK3588' || inputs.DEVICE == 'S922X' || inputs.DEVICE == 'SM8250' || inputs.DEVICE == 'SM8550' }}
run: |
sudo tar --zstd -xf build.qt6.tar.zst --same-owner
uses: corrupt952/actions-retry-command@v1.0.7
with:
command: |
sudo tar --zstd -xf build.qt6.tar.zst --same-owner
max_attempts: 3
retry_interval: 10
- name: Clean up compressed qt6 file
if: ${{ inputs.DEVICE == 'RK3399' || inputs.DEVICE == 'RK3566' || inputs.DEVICE == 'RK3588' || inputs.DEVICE == 'S922X' || inputs.DEVICE == 'SM8250' || inputs.DEVICE == 'SM8550' }}
@@ -104,10 +119,6 @@ jobs:
- name: Clean up compressed mame-lr file
run: rm build.mame-lr.tar.zst
- name: Expand ccache
run: |
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -d ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache -M 20G
- name: Build
uses: corrupt952/actions-retry-command@v1.0.7
with:
@@ -130,31 +141,31 @@ jobs:
output.log
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.threads/logs/
- name: Delete used cache
if: ${{ steps.retrieve-cache.outputs.cache-hit && steps.retrieve-cache.outputs.cache-matched-key != env.CACHE_KEY }}
continue-on-error: true
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete "${{ steps.retrieve-cache.outputs.cache-matched-key }}" -R $GH_REPO --confirm
- name: Clean ccache
run: |
export CCACHE_DIR=./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -M 1.2G
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -M 1.9G
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -c
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -z
- name: Tar ccache
run: |
tar -cf ccache-aarch64-${{ inputs.DEVICE }}-emu-libretro.tar ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
- name: Save ccache
if: ${{ ! steps.retrieve-cache.outputs.cache-hit || steps.retrieve-cache.outputs.cache-matched-key != env.CACHE_KEY }}
uses: actions/cache/save@v4
uses: ncipollo/release-action@v1
with:
path: ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
key: ccache-aarch64-${{ inputs.DEVICE }}-emu-libretro-${{ github.sha }}
tag: ccache
artifacts: ccache-aarch64-${{ inputs.DEVICE }}-emu-libretro.tar
allowUpdates: true
makeLatest: true
prerelease: true
body: ccache
token: ${{ secrets.GH_PAT }}
repo: distribution-cache
continue-on-error: true
- name: Print space
run: df -h

View File

@@ -70,15 +70,10 @@ jobs:
with:
fetch-depth: 0
- name: Retrieve ccache aarch64
id: retrieve-cache
uses: buildjet/cache/restore@v4
with:
path: ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
key: ccache-aarch64-${{ inputs.DEVICE }}-emu-standalone-${{ github.sha }}
restore-keys: |
ccache-aarch64-${{ inputs.DEVICE }}-emu-standalone-${{ github.sha }}
ccache-aarch64-${{ inputs.DEVICE }}-emu-standalone-
- name: Retrieve ccache
run: |
URL="https://github.com/${{ github.repository_owner }}/distribution-cache/releases/download/ccache/ccache-aarch64-${{ inputs.DEVICE }}-emu-standalone.tar"
curl -L --fail --silent --show-error "$URL" | tar -xvf - || echo "Cache archive not found, skipping."
- name: Download aarch64 (${{ inputs.DEVICE }})
uses: actions/download-artifact@v4
@@ -96,6 +91,22 @@ jobs:
- name: Clean up compressed aarch64 file
run: rm build.aarch64.tar
- name: Download build aarch64 (${{ inputs.DEVICE }})
uses: actions/download-artifact@v4
with:
name: aarch64 build (${{ inputs.DEVICE }})
- name: Extract artifact aarch64 build
uses: corrupt952/actions-retry-command@v1.0.7
with:
command: |
tar -xf build.build.aarch64.tar
max_attempts: 3
retry_interval: 10
- name: Clean up compressed aarch64 file
run: rm build.build.aarch64.tar
- name: Download qt6 (${{ inputs.DEVICE }})
if: ${{ inputs.DEVICE == 'RK3399' || inputs.DEVICE == 'RK3566' || inputs.DEVICE == 'RK3588' || inputs.DEVICE == 'S922X' || inputs.DEVICE == 'SM8250' || inputs.DEVICE == 'SM8550' }}
uses: actions/download-artifact@v4
@@ -111,10 +122,6 @@ jobs:
if: ${{ inputs.DEVICE == 'RK3399' || inputs.DEVICE == 'RK3566' || inputs.DEVICE == 'RK3588' || inputs.DEVICE == 'S922X' || inputs.DEVICE == 'SM8250' || inputs.DEVICE == 'SM8550' }}
run: rm build.qt6.tar.zst
- name: Expand ccache
run: |
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -d ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache -M 20G
- name: Build
uses: corrupt952/actions-retry-command@v1.0.7
with:
@@ -137,27 +144,31 @@ jobs:
output.log
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.threads/logs/
- name: Delete used cache
if: ${{ steps.retrieve-cache.outputs.cache-hit && steps.retrieve-cache.outputs.cache-matched-key != env.CACHE_KEY }}
uses: buildjet/cache-delete@v1
with:
cache_key: ${{ steps.retrieve-cache.outputs.cache-matched-key }}
- name: Clean ccache
run: |
export CCACHE_DIR=./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -M 1.4G
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -M 1.9G
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -c
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -z
- name: Tar ccache
run: |
tar -cf ccache-aarch64-${{ inputs.DEVICE }}-emu-standalone.tar ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
- name: Save ccache
if: ${{ ! steps.retrieve-cache.outputs.cache-hit || steps.retrieve-cache.outputs.cache-matched-key != env.CACHE_KEY }}
uses: buildjet/cache/save@v4
uses: ncipollo/release-action@v1
with:
path: ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
key: ccache-aarch64-${{ inputs.DEVICE }}-emu-standalone-${{ github.sha }}
tag: ccache
artifacts: ccache-aarch64-${{ inputs.DEVICE }}-emu-standalone.tar
allowUpdates: true
makeLatest: true
prerelease: true
body: ccache
token: ${{ secrets.GH_PAT }}
repo: distribution-cache
continue-on-error: true
- name: Print space
run: df -h

View File

@@ -118,9 +118,6 @@ jobs:
- name: Clean up compressed emu-standalone file
run: rm build.emu-standalone.tar*
- name: Expand ccache
run: |
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -d ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache -M 1G
# clean to rebuild retroarch with 32bit enabled
- name: Clean retroarch
run: |
@@ -152,12 +149,6 @@ jobs:
output.log
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.threads/logs/
- name: Delete used cache
if: ${{ steps.retrieve-cache.outputs.cache-hit && steps.retrieve-cache.outputs.cache-matched-key != env.CACHE_KEY }}
uses: buildjet/cache-delete@v1
with:
cache_key: ${{ steps.retrieve-cache.outputs.cache-matched-key }}
- name: Get date
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV

View File

@@ -45,15 +45,10 @@ jobs:
with:
fetch-depth: 0
- name: Retrieve ccache aarch64
id: retrieve-cache
uses: buildjet/cache/restore@v4
with:
path: ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
key: ccache-aarch64-${{ inputs.DEVICE }}-mame-${{ github.sha }}
restore-keys: |
ccache-aarch64-${{ inputs.DEVICE }}-mame-${{ github.sha }}
ccache-aarch64-${{ inputs.DEVICE }}-mame-
- name: Retrieve ccache
run: |
URL="https://github.com/${{ github.repository_owner }}/distribution-cache/releases/download/ccache/ccache-aarch64-${{ inputs.DEVICE }}-mame.tar"
curl -L --fail --silent --show-error "$URL" | tar -xvf - || echo "Cache archive not found, skipping."
- name: Download aarch64-toolchain (${{ inputs.DEVICE }})
uses: actions/download-artifact@v4
@@ -61,15 +56,16 @@ jobs:
name: aarch64-toolchain (${{ inputs.DEVICE }})
- name: Extract artifact aarch64-toolchain
run: |
tar --zstd -xf build.aarch64-toolchain.tar.zst
uses: corrupt952/actions-retry-command@v1.0.7
with:
command: |
tar --zstd -xf build.aarch64-toolchain.tar.zst
max_attempts: 3
retry_interval: 10
- name: Clean up compressed aarch64 file
run: rm build.aarch64-toolchain.tar.zst
- name: Expand ccache
run: |
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -d ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache -M 20G
- name: Build
uses: corrupt952/actions-retry-command@v1.0.7
@@ -93,27 +89,31 @@ jobs:
output.log
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.threads/logs/
- name: Delete used cache
if: ${{ steps.retrieve-cache.outputs.cache-hit && steps.retrieve-cache.outputs.cache-matched-key != env.CACHE_KEY }}
uses: buildjet/cache-delete@v1
with:
cache_key: ${{ steps.retrieve-cache.outputs.cache-matched-key }}
- name: Clean ccache
run: |
export CCACHE_DIR=./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -M 400M
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -M 500M
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -c
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -z
- name: Tar ccache
run: |
tar -cf ccache-aarch64-${{ inputs.DEVICE }}-mame.tar ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
- name: Save ccache
if: ${{ ! steps.retrieve-cache.outputs.cache-hit || steps.retrieve-cache.outputs.cache-matched-key != env.CACHE_KEY }}
uses: buildjet/cache/save@v4
uses: ncipollo/release-action@v1
with:
path: ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
key: ccache-aarch64-${{ inputs.DEVICE }}-mame-${{ github.sha }}
tag: ccache
artifacts: ccache-aarch64-${{ inputs.DEVICE }}-mame.tar
allowUpdates: true
makeLatest: true
prerelease: true
body: ccache
token: ${{ secrets.GH_PAT }}
repo: distribution-cache
continue-on-error: true
- name: Compress directory
run: |

View File

@@ -50,15 +50,10 @@ jobs:
with:
fetch-depth: 0
- name: Retrieve ccache aarch64
id: retrieve-cache
uses: buildjet/cache/restore@v4
with:
path: ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
key: ccache-aarch64-${{ inputs.DEVICE }}-qt6-${{ github.sha }}
restore-keys: |
ccache-aarch64-${{ inputs.DEVICE }}-qt6-${{ github.sha }}
ccache-aarch64-${{ inputs.DEVICE }}-qt6-
- name: Retrieve ccache
run: |
URL="https://github.com/${{ github.repository_owner }}/distribution-cache/releases/download/ccache/ccache-aarch64-${{ inputs.DEVICE }}-qt6.tar"
curl -L --fail --silent --show-error "$URL" | tar -xvf - || echo "Cache archive not found, skipping."
- name: Download aarch64 (${{ inputs.DEVICE }})
uses: actions/download-artifact@v4
@@ -76,10 +71,6 @@ jobs:
- name: Clean up compressed aarch64 file
run: rm build.aarch64.tar
- name: expand ccache
run: |
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -d ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache -M 20G
- name: Build
uses: corrupt952/actions-retry-command@v1.0.7
with:
@@ -88,7 +79,7 @@ jobs:
touch timestamp_before
set -e
{ docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/rocknix-build:latest" \
bash -c "./scripts/build_mt qt6"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true
bash -c "./scripts/build_mt qt6 modules"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true
exit_code=$(<docker_exit_code)
exit $exit_code
max_attempts: 6
@@ -103,32 +94,36 @@ jobs:
output.log
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.threads/logs/
- name: Delete used cache
if: ${{ steps.retrieve-cache.outputs.cache-hit && steps.retrieve-cache.outputs.cache-matched-key != env.CACHE_KEY }}
uses: buildjet/cache-delete@v1
with:
cache_key: ${{ steps.retrieve-cache.outputs.cache-matched-key }}
- name: Clean ccache
run: |
export CCACHE_DIR=./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -M 800M
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -M 1.9G
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -c
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -z
- name: Tar ccache
run: |
tar -cf ccache-aarch64-${{ inputs.DEVICE }}-qt6.tar ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
- name: Save ccache
if: ${{ ! steps.retrieve-cache.outputs.cache-hit || steps.retrieve-cache.outputs.cache-matched-key != env.CACHE_KEY }}
uses: buildjet/cache/save@v4
uses: ncipollo/release-action@v1
with:
path: ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
key: ccache-aarch64-${{ inputs.DEVICE }}-qt6-${{ github.sha }}
tag: ccache
artifacts: ccache-aarch64-${{ inputs.DEVICE }}-qt6.tar
allowUpdates: true
makeLatest: true
prerelease: true
body: ccache
token: ${{ secrets.GH_PAT }}
repo: distribution-cache
continue-on-error: true
- name: Compress directory
run: |
find ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/ -mindepth 1 -type d -newer timestamp_before > qt6.txt
tar --zstd -cf build.qt6.tar.zst -T qt6.txt
tar --zstd --exclude='build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/build' -cf build.qt6.tar.zst \
build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/
- uses: actions/upload-artifact@v4
with:

View File

@@ -48,15 +48,10 @@ jobs:
with:
fetch-depth: 0
- name: Retrieve ccache aarch64-toolchain
id: retrieve-cache
uses: actions/cache/restore@v4
with:
path: ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
key: ccache-aarch64-${{ inputs.DEVICE }}-toolchain-${{ github.sha }}
restore-keys: |
ccache-aarch64-${{ inputs.DEVICE }}-toolchain-${{ github.sha }}
ccache-aarch64-${{ inputs.DEVICE }}-toolchain-
- name: Retrieve ccache
run: |
URL="https://github.com/${{ github.repository_owner }}/distribution-cache/releases/download/ccache/ccache-aarch64-${{ inputs.DEVICE }}-toolchain.tar"
curl -L --fail --silent --show-error "$URL" | tar -xvf - || echo "Cache archive not found, skipping."
- name: Build
uses: corrupt952/actions-retry-command@v1.0.7
@@ -80,16 +75,6 @@ jobs:
output.log
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.threads/logs/
- name: Delete used cache
if: ${{ steps.retrieve-cache.outputs.cache-hit && steps.retrieve-cache.outputs.cache-matched-key != env.CACHE_KEY }}
continue-on-error: true
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete "${{ steps.retrieve-cache.outputs.cache-matched-key }}" -R $GH_REPO --confirm
- name: Clean ccache
run: |
export CCACHE_DIR=./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
@@ -99,12 +84,22 @@ jobs:
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -z
- name: Tar ccache
run: |
tar -cf ccache-aarch64-${{ inputs.DEVICE }}-toolchain.tar ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
- name: Save ccache
if: ${{ ! steps.retrieve-cache.outputs.cache-hit || steps.retrieve-cache.outputs.cache-matched-key != env.CACHE_KEY }}
uses: actions/cache/save@v4
uses: ncipollo/release-action@v1
with:
path: ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
key: ccache-aarch64-${{ inputs.DEVICE }}-toolchain-${{ github.sha }}
tag: ccache
artifacts: ccache-aarch64-${{ inputs.DEVICE }}-toolchain.tar
allowUpdates: true
makeLatest: true
prerelease: true
body: ccache
token: ${{ secrets.GH_PAT }}
repo: distribution-cache
continue-on-error: true
- name: Compress directory
run: |

View File

@@ -19,6 +19,7 @@ jobs:
env:
EMULATION_DEVICE: no
ENABLE_32BIT: no
MODULES_PKG: no
JAVA_HOME: /usr
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
@@ -47,15 +48,10 @@ jobs:
with:
fetch-depth: 0
- name: Retrieve ccache aarch64
id: retrieve-cache
uses: buildjet/cache/restore@v4
with:
path: ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
key: ccache-aarch64-${{ inputs.DEVICE }}-base-${{ github.sha }}
restore-keys: |
ccache-aarch64-${{ inputs.DEVICE }}-base-${{ github.sha }}
ccache-aarch64-${{ inputs.DEVICE }}-base-
- name: Retrieve ccache
run: |
URL="https://github.com/${{ github.repository_owner }}/distribution-cache/releases/download/ccache/ccache-aarch64-${{ inputs.DEVICE }}.tar"
curl -L --fail --silent --show-error "$URL" | tar -xvf - || echo "Cache archive not found, skipping."
- name: Download aarch64-toolchain (${{ inputs.DEVICE }})
uses: actions/download-artifact@v4
@@ -69,10 +65,6 @@ jobs:
- name: Clean up compressed aarch64-toolchain file
run: rm build.aarch64-toolchain.tar.zst
- name: Expand ccache
run: |
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -d ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache -M 1.4G
- name: Build
uses: corrupt952/actions-retry-command@v1.0.7
with:
@@ -95,38 +87,72 @@ jobs:
output.log
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.threads/logs/
- name: Delete used cache
if: ${{ steps.retrieve-cache.outputs.cache-hit && steps.retrieve-cache.outputs.cache-matched-key != env.CACHE_KEY }}
uses: buildjet/cache-delete@v1
- name: Build modules
if: ${{ inputs.DEVICE == 'RK3326' || inputs.DEVICE == 'H700' }}
uses: corrupt952/actions-retry-command@v1.0.7
with:
cache_key: ${{ steps.retrieve-cache.outputs.cache-matched-key }}
command: |
./scripts/get_env > .env
set -e
{ docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/rocknix-build:latest" \
bash -c "./scripts/build_mt modules "; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true
exit_code=$(<docker_exit_code)
exit $exit_code
max_attempts: 6
retry_interval: 10
- name: Archive output.logs (${{ inputs.DEVICE }}-modules)
if: failure()
uses: actions/upload-artifact@v4
with:
name: output.logs-${{ inputs.DEVICE }}-modules
path: |
output.log
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.threads/logs/
- name: Clean ccache
run: |
export CCACHE_DIR=./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -M 1.3G
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -M 1.9G
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -c
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -s -v
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -z
- name: Tar ccache
run: |
tar --remove-files -cf ccache-aarch64-${{ inputs.DEVICE }}.tar ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
- name: Save ccache
if: ${{ ! steps.retrieve-cache.outputs.cache-hit || steps.retrieve-cache.outputs.cache-matched-key != env.CACHE_KEY }}
uses: buildjet/cache/save@v4
uses: ncipollo/release-action@v1
with:
path: ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.ccache
key: ccache-aarch64-${{ inputs.DEVICE }}-base-${{ github.sha }}
tag: ccache
artifacts: ccache-aarch64-${{ inputs.DEVICE }}.tar
allowUpdates: true
makeLatest: true
prerelease: true
body: ccache
token: ${{ secrets.GH_PAT }}
repo: distribution-cache
continue-on-error: true
- name: Print space
run: df -h
- name: Compress directory
run: |
sudo tar --remove-files -cf build.aarch64.tar \
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/
sudo tar --remove-files \
-cf build.build.aarch64.tar ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/build
sudo tar --remove-files \
-cf build.aarch64.tar ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/
- uses: actions/upload-artifact@v4
with:
name: aarch64 (${{ inputs.DEVICE }})
path: build.aarch64.tar
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: aarch64 build (${{ inputs.DEVICE }})
path: build.build.aarch64.tar
if-no-files-found: error

View File

@@ -40,6 +40,11 @@ jobs:
with:
fetch-depth: 0
- name: Retrieve ccache
run: |
URL="https://github.com/${{ github.repository_owner }}/distribution-cache/releases/download/ccache/ccache-arm-${{ inputs.DEVICE }}.tar"
curl -L --fail --silent --show-error "$URL" | tar -xvf - || echo "Cache archive not found, skipping."
- name: build
uses: corrupt952/actions-retry-command@v1.0.7
with:
@@ -60,12 +65,45 @@ jobs:
name: output.logs (${{ inputs.DEVICE }}-arm)
path: |
output.log
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.threads/logs/
./build.ROCKNIX-${{ inputs.DEVICE }}.arm/.threads/logs/
- name: Clean ccache
run: |
export CCACHE_DIR=./build.ROCKNIX-${{ inputs.DEVICE }}.arm/.ccache
./build.ROCKNIX-${{ inputs.DEVICE }}.arm/toolchain/bin/ccache -s -v
./build.ROCKNIX-${{ inputs.DEVICE }}.arm/toolchain/bin/ccache -M 1G
./build.ROCKNIX-${{ inputs.DEVICE }}.arm/toolchain/bin/ccache -c
./build.ROCKNIX-${{ inputs.DEVICE }}.arm/toolchain/bin/ccache -s -v
./build.ROCKNIX-${{ inputs.DEVICE }}.arm/toolchain/bin/ccache -z
- name: Tar ccache
run: |
tar -cf ccache-arm-${{ inputs.DEVICE }}.tar ./build.ROCKNIX-${{ inputs.DEVICE }}.arm/.ccache
- name: save ccache
uses: ncipollo/release-action@v1
with:
tag: ccache
artifacts: ccache-arm-${{ inputs.DEVICE }}.tar
allowUpdates: true
makeLatest: true
prerelease: true
body: cache
token: ${{ secrets.GH_PAT }}
repo: distribution-cache
continue-on-error: true
- name: Compress directory
run: |
tar --zstd -cf build.arm.tar.zst \
build.ROCKNIX-${{ inputs.DEVICE }}.arm/
find build.ROCKNIX-${{ inputs.DEVICE }}.arm \
-path build.ROCKNIX-${{ inputs.DEVICE }}.arm/build -prune -o \
-print > filelist.txt
find build.ROCKNIX-${{ inputs.DEVICE }}.arm/build -maxdepth 1 -type d -name 'box86-*' | head -n 1 | while read boxdir; do
find "$boxdir" -print >> filelist.txt
done
tar --zstd -cf build.arm.tar.zst --files-from=filelist.txt
- uses: actions/upload-artifact@v4
with:
name: arm (${{ inputs.DEVICE }})

View File

@@ -27,6 +27,7 @@ on:
jobs:
build-arm:
uses: ./.github/workflows/build-arm.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
@@ -34,6 +35,7 @@ jobs:
build-aarch64-toolchain:
uses: ./.github/workflows/build-aarch64-toolchain.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
@@ -42,6 +44,7 @@ jobs:
build-aarch64:
needs: build-aarch64-toolchain
uses: ./.github/workflows/build-aarch64.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
@@ -50,6 +53,7 @@ jobs:
build-aarch64-mame-lr:
needs: build-aarch64-toolchain
uses: ./.github/workflows/build-aarch64-mame-lr.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
@@ -58,6 +62,7 @@ jobs:
build-aarch64-qt6:
needs: build-aarch64
uses: ./.github/workflows/build-aarch64-qt6.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
@@ -70,6 +75,7 @@ jobs:
- build-aarch64-qt6
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') }}
uses: ./.github/workflows/build-aarch64-emu-libretro.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}
@@ -81,6 +87,7 @@ jobs:
- build-aarch64-qt6
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') }}
uses: ./.github/workflows/build-aarch64-emu-standalone.yml
secrets: inherit
with:
PROJECT: ${{ inputs.PROJECT }}
DEVICE: ${{ inputs.DEVICE }}

View File

@@ -73,7 +73,7 @@ jobs:
OFFICIAL: ${{ needs.set-envs.outputs.OFFICIAL }}
rerun-failed-jobs:
if: always() && !cancelled() && contains(needs.*.result, 'failure') && fromJSON(github.run_attempt) < 3 && github.ref_name == 'next' && (github.event_name != 'schedule' || github.repository == 'ROCKNIX/distribution')
if: always() && !cancelled() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && fromJSON(github.run_attempt) < 3 && github.ref_name == 'next' && (github.event_name != 'schedule' || github.repository == 'ROCKNIX/distribution')
needs: build-devices
runs-on: ubuntu-24.04
steps:
@@ -83,7 +83,7 @@ jobs:
run: gh workflow run retry-workflow.yml -F run_id=${{ github.run_id }}
release-nightly:
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') && github.repository_owner == 'ROCKNIX' && needs.set-envs.outputs.NIGHTLY == 'yes' }}
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && github.repository_owner == 'ROCKNIX' && needs.set-envs.outputs.NIGHTLY == 'yes' }}
name: Release nightly
needs: build-devices
runs-on: ubuntu-24.04
@@ -143,7 +143,7 @@ jobs:
repo: distribution-nightly
release-official:
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') && github.repository_owner == 'ROCKNIX' && needs.set-envs.outputs.OFFICIAL == 'yes' }}
if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && github.repository_owner == 'ROCKNIX' && needs.set-envs.outputs.OFFICIAL == 'yes' }}
name: Release official
needs: build-devices
runs-on: ubuntu-24.04

View File

@@ -118,6 +118,9 @@
# Add support for containers
CONTAINER_SUPPORT="${CONTAINER_SUPPORT:-no}"
# Build modules packages
MODULES_PKG="${MODULES_PKG:-yes}"
# Support for debug tools such as strace
DEBUG_PACKAGES="${DEBUG_PACKAGES:-yes}"

View File

@@ -12,7 +12,7 @@ PKG_DEPENDS_TARGET="toolchain squashfs-tools:host dosfstools:host fakeroot:host
mtools:host populatefs:host libc gcc linux linux-drivers linux-firmware \
${BOOTLOADER} busybox umtprd util-linux usb-modeswitch unzip poppler jq socat \
p7zip file initramfs grep wget util-linux btrfs-progs zstd lz4 empty lzo libzip \
bash coreutils modules system-utils autostart quirks powerstate gnupg \
bash coreutils system-utils autostart quirks powerstate gnupg \
gzip six lynx xmlstarlet vim pyudev dialog dbus-python network rocknix"
PKG_UI="emulationstation es-themes textviewer"
@@ -99,4 +99,7 @@ fi
# btop
[ "${BTOP_TOOL}" = "yes" ] && PKG_DEPENDS_TARGET+=" btop"
# modules packages
[ "${MODULES_PKG}" = "yes" ] && PKG_DEPENDS_TARGET+=" modules"
true