jhbuild: bump libsoup to 3.6.6 #668
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: wkdev-sdk | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main, tag/** ] | |
| paths-ignore: [ docs/*, README.md] | |
| pull_request: | |
| paths-ignore: [ docs/*, README.md] | |
| create: | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build_amd64: | |
| runs-on: [self-hosted, x64] | |
| permissions: | |
| packages: write | |
| if: | | |
| github.event_name != 'create' || | |
| startsWith(github.ref_name, 'tag/') | |
| steps: | |
| - name: Set tag name | |
| run: | | |
| if [ "${GITHUB_REF_NAME}" = 'main' ]; then | |
| echo "WKDEV_SDK_TAG=latest" >> "${GITHUB_ENV}" | |
| elif [[ "${GITHUB_REF_NAME}" =~ ^tag/(.+)$ ]]; then | |
| echo "WKDEV_SDK_TAG=${BASH_REMATCH[1]}" >> "${GITHUB_ENV}" | |
| else | |
| echo "WKDEV_SDK_TAG=latest" >> "${GITHUB_ENV}" | |
| fi | |
| echo "WKDEV_SDK_CONTAINER_REGISTRY_USER_NAME=$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')" >> "${GITHUB_ENV}" | |
| echo "REPO=ghcr.io/$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')/wkdev-sdk" >> "${GITHUB_ENV}" | |
| - name: Install podman | |
| run: sudo apt-get update && sudo apt-get -y install podman fuse-overlayfs | |
| - name: Prune old containers/images | |
| run: | | |
| echo "Disk space before prune:" | |
| df -h | |
| echo "Pruning containers and images older than 2 weeks..." | |
| podman system prune --all --force --volumes --filter until=336h || true | |
| echo "Disk space after prune:" | |
| df -h | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Clean unrelated images | |
| run: | | |
| podman rmi --ignore --force ${REPO}:${WKDEV_SDK_TAG} | |
| podman manifest rm ${REPO}:${WKDEV_SDK_TAG} || true | |
| podman rmi --ignore --force ${REPO}:${WKDEV_SDK_TAG}_amd64 | |
| - name: Build image | |
| run: | | |
| podman build --jobs $(nproc) --build-context scripts=./scripts -t ${REPO}:${WKDEV_SDK_TAG}_amd64 --arch=amd64 images/wkdev_sdk | |
| podman image list | |
| - name: Test image | |
| run: | | |
| CONTAINER="wkdev-$(date +%s)" | |
| echo "CONTAINER=${CONTAINER}" >> "${GITHUB_ENV}" | |
| source ./register-sdk-on-host.sh | |
| wkdev-create --create-home --home ${HOME}/${CONTAINER}-home --verbose --attach --no-pull --name ${CONTAINER} --arch amd64 | |
| wkdev-enter -n ${CONTAINER} --exec -- git clone --depth=1 https://github.com/WebKit/WebKit.git | |
| wkdev-enter -n ${CONTAINER} --exec -- ./WebKit/Tools/Scripts/build-webkit --wpe --release --generate-project-only | |
| wkdev-enter -n ${CONTAINER} --exec -- ./WebKit/Tools/Scripts/build-webkit --gtk --release --generate-project-only | |
| - name: Push image | |
| if: github.ref_name == 'main' || startsWith(github.ref_name, 'tag/') | |
| run: | | |
| echo "${{ secrets.GITHUB_TOKEN }}" | podman login ghcr.io --username=${GITHUB_REPOSITORY_OWNER} --password-stdin | |
| podman push ${REPO}:${WKDEV_SDK_TAG}_amd64 | |
| - name: Cleanup test artifacts | |
| if: always() | |
| run: | | |
| # Remove the specific container created by this test run | |
| if [ -n "${CONTAINER:-}" ]; then | |
| podman rm --force ${CONTAINER} 2>/dev/null || true | |
| rm -rf ${HOME}/${CONTAINER}-home || true | |
| fi | |
| # Clean up any leftover containers and home directories from previous failed runs | |
| podman ps -a --filter "name=^wkdev-" --format "{{.Names}}" | xargs -r podman rm --force 2>/dev/null || true | |
| find ${HOME} -maxdepth 1 -type d -name "wkdev-*-home" -exec rm -rf {} + 2>/dev/null || true | |
| build_arm64: | |
| runs-on: [self-hosted, arch-arm64] | |
| permissions: | |
| packages: write | |
| if: | | |
| github.event_name != 'create' || | |
| startsWith(github.ref_name, 'tag/') | |
| steps: | |
| - name: Set tag name | |
| run: | | |
| if [ "${GITHUB_REF_NAME}" = 'main' ]; then | |
| echo "WKDEV_SDK_TAG=latest" >> "${GITHUB_ENV}" | |
| elif [[ "${GITHUB_REF_NAME}" =~ ^tag/(.+)$ ]]; then | |
| echo "WKDEV_SDK_TAG=${BASH_REMATCH[1]}" >> "${GITHUB_ENV}" | |
| else | |
| echo "WKDEV_SDK_TAG=latest" >> "${GITHUB_ENV}" | |
| fi | |
| echo "WKDEV_SDK_CONTAINER_REGISTRY_USER_NAME=$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')" >> "${GITHUB_ENV}" | |
| echo "REPO=ghcr.io/$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')/wkdev-sdk" >> "${GITHUB_ENV}" | |
| - name: Install podman | |
| run: sudo apt-get update && sudo apt-get -y install podman fuse-overlayfs | |
| - name: Prune old containers/images | |
| run: | | |
| echo "Disk space before prune:" | |
| df -h | |
| echo "Pruning containers and images older than 2 weeks..." | |
| podman system prune --all --force --volumes --filter until=336h || true | |
| echo "Disk space after prune:" | |
| df -h | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Clean unrelated images | |
| run: | | |
| podman rmi --ignore --force ${REPO}:${WKDEV_SDK_TAG} | |
| podman manifest rm ${REPO}:${WKDEV_SDK_TAG} || true | |
| podman rmi --ignore --force ${REPO}:${WKDEV_SDK_TAG}_arm64 | |
| - name: Build image | |
| run: | | |
| podman build --jobs $(nproc) --build-context scripts=./scripts -t ${REPO}:${WKDEV_SDK_TAG}_arm64 --arch=arm64 images/wkdev_sdk | |
| podman image list | |
| - name: Test image | |
| run: | | |
| CONTAINER="wkdev-$(date +%s)" | |
| echo "CONTAINER=${CONTAINER}" >> "${GITHUB_ENV}" | |
| source ./register-sdk-on-host.sh | |
| wkdev-create --create-home --home ${HOME}/${CONTAINER}-home --verbose --attach --no-pull --name ${CONTAINER} --arch arm64 --shell /bin/bash | |
| wkdev-enter -n ${CONTAINER} --exec -- git clone --depth=1 https://github.com/WebKit/WebKit.git | |
| wkdev-enter -n ${CONTAINER} --exec -- ./WebKit/Tools/Scripts/build-webkit --wpe --release --generate-project-only | |
| wkdev-enter -n ${CONTAINER} --exec -- ./WebKit/Tools/Scripts/build-webkit --gtk --release --generate-project-only | |
| - name: Push image | |
| if: github.ref_name == 'main' || startsWith(github.ref_name, 'tag/') | |
| run: | | |
| echo "${{ secrets.GITHUB_TOKEN }}" | podman login ghcr.io --username=${GITHUB_REPOSITORY_OWNER} --password-stdin | |
| podman push ${REPO}:${WKDEV_SDK_TAG}_arm64 | |
| - name: Cleanup test artifacts | |
| if: always() | |
| run: | | |
| # Remove the specific container created by this test run | |
| if [ -n "${CONTAINER:-}" ]; then | |
| podman rm --force ${CONTAINER} 2>/dev/null || true | |
| rm -rf ${HOME}/${CONTAINER}-home || true | |
| fi | |
| # Clean up any leftover containers and home directories from previous failed runs | |
| podman ps -a --filter "name=^wkdev-" --format "{{.Names}}" | xargs -r podman rm --force 2>/dev/null || true | |
| find ${HOME} -maxdepth 1 -type d -name "wkdev-*-home" -exec rm -rf {} + 2>/dev/null || true | |
| deploy: | |
| runs-on: [self-hosted, x64] | |
| permissions: | |
| packages: write | |
| needs: [build_amd64, build_arm64] | |
| if: | | |
| (github.event_name != 'create' || startsWith(github.ref_name, 'tag/')) && | |
| (github.ref_name == 'main' || startsWith(github.ref_name, 'tag/')) | |
| steps: | |
| - name: Set tag name | |
| run: | | |
| if [ "${GITHUB_REF_NAME}" = 'main' ]; then | |
| echo "WKDEV_SDK_TAG=latest" >> "${GITHUB_ENV}" | |
| elif [[ "${GITHUB_REF_NAME}" =~ ^tag/(.+)$ ]]; then | |
| echo "WKDEV_SDK_TAG=${BASH_REMATCH[1]}" >> "${GITHUB_ENV}" | |
| else | |
| echo "WKDEV_SDK_TAG=latest" >> "${GITHUB_ENV}" | |
| fi | |
| echo "WKDEV_SDK_CONTAINER_REGISTRY_USER_NAME=$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')" >> "${GITHUB_ENV}" | |
| echo "REPO=ghcr.io/$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')/wkdev-sdk" >> "${GITHUB_ENV}" | |
| - name: Install podman and skopeo | |
| run: sudo apt-get update && sudo apt-get -y install podman fuse-overlayfs skopeo | |
| - name: Prune old containers/images | |
| run: | | |
| echo "Disk space before prune:" | |
| df -h | |
| echo "Pruning containers and images older than 2 weeks..." | |
| podman system prune --all --force --volumes --filter until=336h || true | |
| echo "Disk space after prune:" | |
| df -h | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set registry auth file | |
| run: echo "REGISTRY_AUTH_FILE=path" >> $GITHUB_ENV | |
| - name: Login to registry | |
| run: echo "${{ secrets.GITHUB_TOKEN }}" | skopeo login ghcr.io --username=${GITHUB_REPOSITORY_OWNER} --password-stdin | |
| - name: Validate all architecture images exist in registry | |
| id: validate | |
| run: | | |
| VALIDATION_FAILED=0 | |
| for arch in amd64 arm64 arm; do | |
| if ! skopeo inspect docker://${REPO}:${WKDEV_SDK_TAG}_${arch} > /dev/null 2>&1; then | |
| echo "Error: Image ${REPO}:${WKDEV_SDK_TAG}_${arch} does not exist in registry" | |
| VALIDATION_FAILED=1 | |
| else | |
| echo "Validated: ${REPO}:${WKDEV_SDK_TAG}_${arch} exists in registry" | |
| fi | |
| done | |
| if [ $VALIDATION_FAILED -eq 1 ]; then | |
| echo "validation_failed=true" >> $GITHUB_OUTPUT | |
| exit 1 | |
| fi | |
| echo "validation_failed=false" >> $GITHUB_OUTPUT | |
| - name: Clean up arch-specific images on validation failure (amd64) | |
| if: failure() && steps.validate.outputs.validation_failed == 'true' | |
| continue-on-error: true | |
| uses: bots-house/ghcr-delete-image-action@v1.1.0 | |
| with: | |
| owner: ${{ github.repository_owner }} | |
| name: wkdev-sdk | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ env.WKDEV_SDK_TAG }}_amd64 | |
| - name: Clean up arch-specific images on validation failure (arm64) | |
| if: failure() && steps.validate.outputs.validation_failed == 'true' | |
| continue-on-error: true | |
| uses: bots-house/ghcr-delete-image-action@v1.1.0 | |
| with: | |
| owner: ${{ github.repository_owner }} | |
| name: wkdev-sdk | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ env.WKDEV_SDK_TAG }}_arm64 | |
| - name: Pull arch-specific images to local storage | |
| run: | | |
| podman pull ${REPO}:${WKDEV_SDK_TAG}_amd64 | |
| podman pull ${REPO}:${WKDEV_SDK_TAG}_arm64 | |
| - name: Delete arch-specific tag (amd64) | |
| uses: bots-house/ghcr-delete-image-action@v1.1.0 | |
| with: | |
| owner: ${{ github.repository_owner }} | |
| name: wkdev-sdk | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ env.WKDEV_SDK_TAG }}_amd64 | |
| - name: Delete arch-specific tag (arm64) | |
| uses: bots-house/ghcr-delete-image-action@v1.1.0 | |
| with: | |
| owner: ${{ github.repository_owner }} | |
| name: wkdev-sdk | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ env.WKDEV_SDK_TAG }}_arm64 | |
| - name: Create multi-arch manifest from local storage | |
| run: | | |
| podman manifest create ${REPO}:${WKDEV_SDK_TAG} | |
| podman manifest add ${REPO}:${WKDEV_SDK_TAG} containers-storage:${REPO}:${WKDEV_SDK_TAG}_amd64 | |
| podman manifest add ${REPO}:${WKDEV_SDK_TAG} containers-storage:${REPO}:${WKDEV_SDK_TAG}_arm64 | |
| - name: Push self-contained multi-arch manifest with all layers | |
| run: | | |
| podman manifest push --all ${REPO}:${WKDEV_SDK_TAG} docker://${REPO}:${WKDEV_SDK_TAG} |