From 8ca4b8b26832e90d7346761491a5a01ac1015fd4 Mon Sep 17 00:00:00 2001 From: Andrew Walsh Date: Fri, 6 Nov 2026 05:56:14 -0800 Subject: [PATCH] Deduplicate action test setup and expected-failure steps (#225) Move the artifact download and distribute directory setup, repeated in all 31 test jobs, into the local composite action setup-distribute. Move the expected-failure verification, repeated in 5 jobs, into expect-failure, which also reports the actual step outcome. Co-authored-by: Claude Opus 5.5 --- .github/actions/expect-failure/action.yml | 22 + .github/actions/setup-distribute/action.yml | 26 + .github/workflows/action-tests.yml | 541 ++------------------ 3 files changed, 87 insertions(+), 502 deletions(-) create mode 100644 .github/actions/expect-failure/action.yml create mode 100644 .github/actions/setup-distribute/action.yml diff --git a/.github/actions/expect-failure/action.yml b/.github/actions/expect-failure/action.yml new file mode 100644 index 0000000..a5f54bd --- /dev/null +++ b/.github/actions/expect-failure/action.yml @@ -0,0 +1,22 @@ +name: Expect failure +description: > + Fail the job unless the given step outcome is 'failure'. Use after a step + run with continue-on-error to assert that it failed. + +inputs: + outcome: + description: Outcome of the step expected to fail (steps..outcome). + required: true + +runs: + using: composite + steps: + - name: Verify step failed + shell: bash + env: + OUTCOME: ${{ inputs.outcome }} + run: | + if [[ "${OUTCOME}" != "failure" ]]; then + echo "Expected the action to fail but its outcome was '${OUTCOME}'." + exit 1 + fi diff --git a/.github/actions/setup-distribute/action.yml b/.github/actions/setup-distribute/action.yml new file mode 100644 index 0000000..5b15838 --- /dev/null +++ b/.github/actions/setup-distribute/action.yml @@ -0,0 +1,26 @@ +name: Setup distribute directory +description: > + Download the build artifacts from the build_binaries job and arrange them + into distribute// directories. Requires the repository to be checked + out first. + +runs: + using: composite + steps: + - name: Download build artifacts + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + pattern: cache-apt-pkgs-* + path: distribute-artifacts + - name: Setup distribute directory + shell: bash + run: | + mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM + for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do + if [ -d "$artifact_dir" ]; then + arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') + echo "Copying artifacts for architecture: $arch" + cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true + fi + done + ls -la distribute/*/ || true diff --git a/.github/workflows/action-tests.yml b/.github/workflows/action-tests.yml index b34d352..e4ac94b 100644 --- a/.github/workflows/action-tests.yml +++ b/.github/workflows/action-tests.yml @@ -27,23 +27,7 @@ jobs: name: List all package versions (including deps). steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - name: Execute id: execute uses: ./ @@ -70,23 +54,7 @@ jobs: name: List package versions. steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - name: Execute id: execute uses: ./ @@ -112,23 +80,7 @@ jobs: name: Standard workflow install package and cache. steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - name: Execute id: execute uses: ./ @@ -149,23 +101,7 @@ jobs: name: Standard workflow packages with new version. steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - name: Execute id: execute uses: ./ @@ -187,23 +123,7 @@ jobs: name: Standard workflow restore cached packages. steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - name: Execute id: execute uses: ./ @@ -224,23 +144,7 @@ jobs: name: Standard workflow restore with packages out of order. steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - name: Execute id: execute uses: ./ @@ -261,23 +165,7 @@ jobs: name: Standard workflow add another package. steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - name: Execute id: execute uses: ./ @@ -298,23 +186,7 @@ jobs: name: Standard workflow restore added package. steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - name: Execute id: execute uses: ./ @@ -335,23 +207,7 @@ jobs: name: No packages passed. steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - name: Execute id: execute uses: ./ @@ -359,9 +215,9 @@ jobs: packages: "" continue-on-error: true - name: Verify - if: steps.execute.outcome == 'failure' - run: exit 0 - shell: bash + uses: ./.github/actions/expect-failure + with: + outcome: ${{ steps.execute.outcome }} package_not_found: needs: [build_binaries] @@ -369,23 +225,7 @@ jobs: name: Package not found. steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - name: Execute id: execute uses: ./ @@ -393,9 +233,10 @@ jobs: packages: package_that_doesnt_exist continue-on-error: true - name: Verify - if: steps.execute.outcome == 'failure' - run: exit 0 - shell: bash + uses: ./.github/actions/expect-failure + with: + outcome: ${{ steps.execute.outcome }} + version_contains_spaces: needs: [build_binaries] @@ -403,23 +244,7 @@ jobs: name: Version contains spaces. steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - name: Execute id: execute uses: ./ @@ -429,9 +254,9 @@ jobs: debug: ${{ env.DEBUG }} continue-on-error: true - name: Verify - if: steps.execute.outcome == 'failure' - run: exit 0 - shell: bash + uses: ./.github/actions/expect-failure + with: + outcome: ${{ steps.execute.outcome }} regression_36: needs: [build_binaries] @@ -439,23 +264,7 @@ jobs: name: "Reinstall existing package (regression issue #36)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: libgtk-3-dev @@ -468,23 +277,7 @@ jobs: name: "Install with reported package dependencies not installed (regression issue #37)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: libosmesa6-dev libgl1-mesa-dev python3-tk pandoc git-restore-mtime @@ -497,23 +290,7 @@ jobs: name: Debug disabled. steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: xdot @@ -526,23 +303,7 @@ jobs: name: "Cache Java CA certs package v1 (regression issue #72)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: openjdk-11-jre @@ -555,23 +316,7 @@ jobs: name: "Cache Java CA certs package v2 (regression issue #72)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: default-jre @@ -584,23 +329,7 @@ jobs: name: "Cache empty archive (regression issue #76)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - run: | sudo wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null; echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list; @@ -620,23 +349,7 @@ jobs: name: "Tar error with libboost-dev (regression issue #79)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: libboost-dev @@ -649,23 +362,7 @@ jobs: name: "Tar error with alsa-ucm-conf (regression issue #81)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: @@ -680,23 +377,7 @@ jobs: name: "Install multiline package listing using literal block style (regression issue #84)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: > @@ -710,23 +391,7 @@ jobs: name: "Restore multiline package listing using literal block style (regression issue #84)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - name: Execute id: execute uses: ./ @@ -747,23 +412,7 @@ jobs: name: "Install multiline package listing using literal block style (regression issue #84)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: | @@ -778,23 +427,7 @@ jobs: name: "Restore multiline package listing using literal block style (regression issue #84)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - name: Execute id: execute uses: ./ @@ -815,23 +448,7 @@ jobs: name: "Upload logs artifact name (regression issue #89)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: libgtk-3-dev:amd64 @@ -844,23 +461,7 @@ jobs: name: "Install error due to SHELLOPTS override (regression issue #98)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: git-restore-mtime libgl1-mesa-dev libosmesa6-dev pandoc @@ -873,23 +474,7 @@ jobs: name: "Stale apt repo not finding package on restore, install phase (regression issue #106)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: libtk8.6 @@ -902,23 +487,7 @@ jobs: name: "Stale apt repo not finding package on restore, restore phase (regression issue #106)." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: libtk8.6 @@ -931,23 +500,7 @@ jobs: name: "Cache packages with multi-arch cache key." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: libfuse2 @@ -960,23 +513,7 @@ jobs: name: "Cache virtual package." steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - name: Download build artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - pattern: cache-apt-pkgs-* - path: distribute-artifacts - - name: Setup distribute directory - shell: bash - run: | - mkdir -p distribute/X64 distribute/X86 distribute/ARM64 distribute/ARM - for artifact_dir in distribute-artifacts/cache-apt-pkgs-*; do - if [ -d "$artifact_dir" ]; then - arch=$(basename "$artifact_dir" | sed 's/cache-apt-pkgs-\([^-]*\)-.*/\1/') - echo "Copying artifacts for architecture: $arch" - cp -r "$artifact_dir"/* "distribute/$arch/" 2>/dev/null || true - fi - done - ls -la distribute/*/ || true + - uses: ./.github/actions/setup-distribute - uses: ./ with: packages: libvips