fix gh buildx cache and test appimage logging
This commit is contained in:
1 parent
d8a33b7547
commit
4ab32d7966
2 files changed
+166
-52
No files matched your search
+32
-24
@@ -68,22 +68,26 @@ jobs:
|
||||
- run: flutter pub get
|
||||
- run: flutter build linux --release --no-pub
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- name: Read AppImage base image
|
||||
id: appimage-base
|
||||
run: echo "image=$(jq -r '.ubuntu' scripts/appimage-tools.json)" >> "$GITHUB_OUTPUT"
|
||||
- name: Build cached x86_64 runtime test image
|
||||
run: |
|
||||
docker buildx build \
|
||||
--platform linux/amd64 \
|
||||
--target runtime-test \
|
||||
--build-arg "BASE_IMAGE=$(jq -r '.ubuntu' scripts/appimage-tools.json)" \
|
||||
--cache-from type=gha,scope=meshcore-appimage-runtime-amd64 \
|
||||
--cache-to type=gha,mode=max,scope=meshcore-appimage-runtime-amd64 \
|
||||
--tag meshcore-appimage-runtime:ci \
|
||||
--load \
|
||||
-f scripts/appimage/Dockerfile \
|
||||
scripts
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: scripts
|
||||
file: scripts/appimage/Dockerfile
|
||||
target: runtime-test
|
||||
platforms: linux/amd64
|
||||
build-args: |
|
||||
BASE_IMAGE=${{ steps.appimage-base.outputs.image }}
|
||||
tags: meshcore-appimage-runtime:ci
|
||||
cache-from: type=gha,scope=meshcore-appimage-runtime-amd64
|
||||
cache-to: type=gha,mode=max,scope=meshcore-appimage-runtime-amd64
|
||||
load: true
|
||||
- name: Test AppImage in clean Ubuntu
|
||||
run: |
|
||||
mkdir -p build/appimage-runtime
|
||||
docker run --rm --user "$(id -u):$(id -g)" --mount "type=bind,source=$PWD/build/linux/x64/release/meshcore-open-x86_64.AppImage,target=/artifact.AppImage,readonly" --mount "type=bind,source=$PWD/scripts/appimage/test_runtime.sh,target=/test_runtime.sh,readonly" --mount "type=bind,source=$PWD/build/appimage-runtime,target=/results" meshcore-appimage-runtime:ci xvfb-run -a bash /test_runtime.sh /artifact.AppImage /results
|
||||
docker run --rm --stop-timeout 15 --user "$(id -u):$(id -g)" --mount "type=bind,source=$PWD/build/linux/x64/release/meshcore-open-x86_64.AppImage,target=/artifact.AppImage,readonly" --mount "type=bind,source=$PWD/scripts/appimage/test_runtime.sh,target=/test_runtime.sh,readonly" --mount "type=bind,source=$PWD/build/appimage-runtime,target=/results" meshcore-appimage-runtime:ci timeout --verbose --signal=TERM --kill-after=15s 300s xvfb-run -a bash /test_runtime.sh /artifact.AppImage /results
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
@@ -140,22 +144,26 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- name: Read AppImage base image
|
||||
id: appimage-base
|
||||
run: echo "image=$(jq -r '.ubuntu' scripts/appimage-tools.json)" >> "$GITHUB_OUTPUT"
|
||||
- name: Build cached ARM64 runtime test image
|
||||
run: |
|
||||
docker buildx build \
|
||||
--platform linux/arm64 \
|
||||
--target runtime-test \
|
||||
--build-arg "BASE_IMAGE=$(jq -r '.ubuntu' scripts/appimage-tools.json)" \
|
||||
--cache-from type=gha,scope=meshcore-appimage-runtime-arm64 \
|
||||
--cache-to type=gha,mode=max,scope=meshcore-appimage-runtime-arm64 \
|
||||
--tag meshcore-appimage-runtime-arm64:ci \
|
||||
--load \
|
||||
-f scripts/appimage/Dockerfile \
|
||||
scripts
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: scripts
|
||||
file: scripts/appimage/Dockerfile
|
||||
target: runtime-test
|
||||
platforms: linux/arm64
|
||||
build-args: |
|
||||
BASE_IMAGE=${{ steps.appimage-base.outputs.image }}
|
||||
tags: meshcore-appimage-runtime-arm64:ci
|
||||
cache-from: type=gha,scope=meshcore-appimage-runtime-arm64
|
||||
cache-to: type=gha,mode=max,scope=meshcore-appimage-runtime-arm64
|
||||
load: true
|
||||
- name: Test ARM64 AppImage in clean Ubuntu
|
||||
run: |
|
||||
mkdir -p build/appimage-runtime
|
||||
docker run --rm --platform linux/arm64 --user "$(id -u):$(id -g)" --mount "type=bind,source=$PWD/build/linux/arm64/release/meshcore-open-aarch64.AppImage,target=/artifact.AppImage,readonly" --mount "type=bind,source=$PWD/scripts/appimage/test_runtime.sh,target=/test_runtime.sh,readonly" --mount "type=bind,source=$PWD/build/appimage-runtime,target=/results" meshcore-appimage-runtime-arm64:ci xvfb-run -a bash /test_runtime.sh /artifact.AppImage /results
|
||||
docker run --rm --stop-timeout 15 --platform linux/arm64 --user "$(id -u):$(id -g)" --mount "type=bind,source=$PWD/build/linux/arm64/release/meshcore-open-aarch64.AppImage,target=/artifact.AppImage,readonly" --mount "type=bind,source=$PWD/scripts/appimage/test_runtime.sh,target=/test_runtime.sh,readonly" --mount "type=bind,source=$PWD/build/appimage-runtime,target=/results" meshcore-appimage-runtime-arm64:ci timeout --verbose --signal=TERM --kill-after=15s 300s xvfb-run -a bash /test_runtime.sh /artifact.AppImage /results
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
|
||||
Reference in new issue
Block a user