Skip to content

Commit

Permalink
Switch to version 4 of GitHub artifact actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mrobinson committed Feb 15, 2024
1 parent c8d99aa commit ebce988
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 124 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,19 @@ jobs:
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
python3 ./mach build --android --target ${{ matrix.arch }} --${{ inputs.profile }}
cp -r target/cargo-timings target/cargo-timings-android-${{ matrix.arch }}
# TODO: This is disabled since APK crashes during startup.
# See https://github.com/servo/servo/issues/31134
# - name: Script tests
# run: ./mach test-android-startup
- name: Rename build timing
run: cp -r target/cargo-timings target/cargo-timings-android-${{ matrix.arch }}
- name: Archive build timing
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cargo-timings
name: cargo-timings-android-${{ matrix.arch }}
# Using a wildcard here ensures that the archive includes the path.
path: target/cargo-timings-*
- name: Upload APK artifact for mach package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: android-${{ matrix.arch }}-${{ inputs.profile }}
name: ${{ inputs.profile }}-binary-android-${{ matrix.arch }}
path: target/android/${{ matrix.arch }}/${{ inputs.profile }}/servoapp.apk
109 changes: 51 additions & 58 deletions .github/workflows/linux-wpt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ on:
env:
RUST_BACKTRACE: 1
SHELL: /bin/bash
WPT_COMMAND_LINE_ARG: "${{ inputs.wpt-layout == 'layout-2013' && '--legacy-layout' || '' }}"
GST_PLUGIN_FEATURE_RANK: pulsesink:NONE,alsasink:NONE,jacksink:NONE,fakesink:MAX
INTERMITTENT_TRACKER_DASHBOARD_SECRET: ${{ !inputs.wpt-sync-from-upstream && secrets.INTERMITTENT_TRACKER_DASHBOARD_SECRET || '' }}
WPT_LAYOUT_ARG: "${{ inputs.wpt-layout == 'layout-2013' && '--legacy-layout' || '' }}"
WPT_ALWAYS_SUCCEED_ARG: "${{ inputs.wpt-sync-from-upstream && '--always-succeed' || '' }}"

jobs:
linux-wpt:
Expand All @@ -45,12 +47,12 @@ jobs:
with:
ref: refs/pull/${{ github.event.number }}/head
fetch-depth: 2
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: release-binary
path: release-binary
name: ${{ inputs.profile }}-binary-linux
path: ${{ inputs.profile }}-binary-linux
- name: unPackage binary
run: tar -xzf release-binary/target.tar.gz
run: tar -xzf ${{ inputs.profile }}-binary-linux/target.tar.gz
- name: Bootstrap dependencies
run: |
python3 -m pip install --upgrade pip
Expand All @@ -62,75 +64,66 @@ jobs:
run: |
./mach update-wpt --sync --patch
- name: Run tests
if: ${{ !inputs.wpt-sync-from-upstream }}
run: |
python3 ./mach test-wpt $WPT_COMMAND_LINE_ARG ${{ inputs.wpt-tests-to-run }} \
mkdir -p wpt-filtered-logs/linux-${{ inputs.wpt-layout }}
mkdir -p wpt-full-logs/linux-${{ inputs.wpt-layout }}
python3 ./mach test-wpt \
$WPT_LAYOUT_ARG \
$WPT_ALWAYS_SUCCEED_ARG \
${{ inputs.wpt-tests-to-run }} \
--${{ inputs.profile }} --processes $(nproc) --timeout-multiplier 2 \
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
--log-raw test-wpt.${{ matrix.chunk_id }}.log \
--log-raw-unexpected unexpected-test-wpt.${{ matrix.chunk_id }}.log \
--filter-intermittents filtered-test-wpt.${{ matrix.chunk_id }}.json
--log-raw wpt-full-logs/linux-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.log \
--log-raw-unexpected wpt-filtered-logs/linux-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.log \
--filter-intermittents wpt-filtered-logs/linux-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.json
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
INTERMITTENT_TRACKER_DASHBOARD_SECRET: ${{ secrets.INTERMITTENT_TRACKER_DASHBOARD_SECRET }}
- name: Run tests (sync)
if: ${{ inputs.wpt-sync-from-upstream }}
run: |
python3 ./mach test-wpt $WPT_COMMAND_LINE_ARG \
--${{ inputs.profile }} --processes $(nproc) --timeout-multiplier 2 \
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
--log-raw test-wpt.${{ matrix.chunk_id }}.log \
--always-succeed
- name: Archive filtered results
uses: actions/upload-artifact@v3
if: ${{ always() && !inputs.wpt-sync-from-upstream }}
with:
name: wpt-filtered-results-linux-${{ inputs.wpt-layout }}
path: |
filtered-test-wpt.${{ matrix.chunk_id }}.json
unexpected-test-wpt.${{ matrix.chunk_id }}.log
- name: Archive logs
uses: actions/upload-artifact@v3
if: ${{ failure() && !inputs.wpt-sync-from-upstream }}
- name: Archive results (filtered)
uses: actions/upload-artifact@v4
with:
name: wpt-logs-linux-${{ inputs.wpt-layout }}
path: |
test-wpt.${{ matrix.chunk_id }}.log
- name: Archive logs
uses: actions/upload-artifact@v3
if: ${{ inputs.wpt-sync-from-upstream }}
name: wpt-filtered-logs-linux-${{ inputs.wpt-layout }}-${{ matrix.chunk_id }}
path: wpt-filtered-logs/*/
- name: Archive results (full)
uses: actions/upload-artifact@v4
if: ${{ failure() || inputs.wpt-sync-from-upstream }}
with:
name: wpt-logs-linux-${{ inputs.wpt-layout }}
path: |
test-wpt.${{ matrix.chunk_id }}.log
wpt-jsonsummary.${{ matrix.chunk_id }}.log
name: wpt-full-logs-linux-${{ inputs.wpt-layout }}-${{ matrix.chunk_id }}
path: wpt-full-logs/*/

report-test-results:
name: Report WPT Results
name: Process WPT Results
runs-on: ubuntu-latest
if: ${{ always() && !cancelled() && !inputs.wpt-sync-from-upstream }}
needs:
- "linux-wpt"
if: ${{ always() }}
needs: linux-wpt
steps:
- name: Merge logs (filtered)
uses: actions/upload-artifact/merge@v4
with:
name: wpt-filtered-logs-linux-${{ inputs.wpt-layout }}
pattern: wpt-filtered-logs-linux-${{ inputs.wpt-layout }}-*
delete-merged: true
- name: Merge logs (full)
if: ${{ always() && contains(needs.*.result, 'failure') || inputs.wpt-sync-from-upstream }}
uses: actions/upload-artifact/merge@v4
with:
name: wpt-full-logs-linux-${{ inputs.wpt-layout }}
pattern: wpt-full-logs-linux-${{ inputs.wpt-layout }}-*
delete-merged: true
- uses: actions/checkout@v3
if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream }}
with:
fetch-depth: 2
- uses: actions/download-artifact@v3
with:
name: wpt-filtered-results-linux-${{ inputs.wpt-layout }}
path: wpt-filtered-results-linux
- name: Create aggregated unexpected results
run: |
cat wpt-filtered-results-linux/*.log > unexpected-test-wpt-${{ inputs.wpt-layout }}.log
- name: Archive aggregate results
uses: actions/upload-artifact@v3
- uses: actions/download-artifact@v4
if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream }}
with:
name: wpt-filtered-results-linux
path: |
unexpected-test-wpt-${{ inputs.wpt-layout }}.log
- name: Comment on PR with results
name: wpt-filtered-logs-linux-${{ inputs.wpt-layout }}
path: results
- name: Report results
if: ${{ !cancelled() && !inputs.wpt-sync-from-upstream }}
run: |
etc/ci/report_aggregated_expected_results.py --tag="linux-wpt-${{ inputs.wpt-layout }}" wpt-filtered-results-linux/*.json
etc/ci/report_aggregated_expected_results.py \
--tag="linux-wpt-${{ inputs.wpt-layout }}" \
results/linux-${{ inputs.wpt-layout }}/*.json
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ jobs:
- name: Tidy
run: python3 ./mach test-tidy --no-progress --all
- name: Build (${{ inputs.profile }})
run: python3 ./mach build --${{ inputs.profile }}
run: |
python3 ./mach build --${{ inputs.profile }}
cp -r target/cargo-timings target/cargo-timings-linux
- name: Smoketest
run: xvfb-run python3 ./mach smoketest --${{ inputs.profile }}
- name: Script tests
Expand All @@ -117,20 +119,18 @@ jobs:
timeout_minutes: 20
max_attempts: 2 # https://github.com/servo/servo/issues/30683
command: python ./mach test-unit --${{ inputs.profile }}
- name: Rename build timing
run: cp -r target/cargo-timings target/cargo-timings-linux
- name: Archive build timing
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cargo-timings
name: cargo-timings-linux
# Using a wildcard here ensures that the archive includes the path.
path: target/cargo-timings-*
- name: Lockfile check
run: ./etc/ci/lockfile_changed.sh
- name: Build mach package
run: python3 ./mach package --${{ inputs.profile }}
- name: Upload artifact for mach package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: linux
path: target/${{ inputs.profile }}/servo-tech-demo.tar.gz
Expand All @@ -147,9 +147,9 @@ jobs:
- name: Build package for target
run: tar -czf target.tar.gz target/${{ inputs.profile }}/servo resources
- name: Upload artifact for target
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release-binary
name: ${{ inputs.profile }}-binary-linux
path: target.tar.gz

wpt-2020:
Expand Down
77 changes: 42 additions & 35 deletions .github/workflows/mac-wpt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ jobs:
with:
ref: refs/pull/${{ github.event.number }}/head
fetch-depth: 2
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: release-binary-macos
name: ${{ inputs.profile }}-binary-macos
- name: Prep test environment
run: |
gtar -xzf target.tar.gz
Expand All @@ -53,53 +53,60 @@ jobs:
run: python3 ./mach smoketest --${{ inputs.profile }}
- name: Run tests
run: |
mkdir -p wpt-filtered-logs/macos-${{ inputs.wpt-layout }}
mkdir -p wpt-full-logs/macos-${{ inputs.wpt-layout }}
python3 ./mach test-wpt $WPT_COMMAND_LINE_ARG ${{ inputs.wpt-tests-to-run }} \
--${{ inputs.profile }} --processes $(sysctl -n hw.logicalcpu) --timeout-multiplier 8 \
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
--log-raw test-wpt.${{ matrix.chunk_id }}.log \
--log-raw-unexpected unexpected-test-wpt.${{ matrix.chunk_id }}.log \
--filter-intermittents filtered-test-wpt.${{ matrix.chunk_id }}.json
- name: Archive filtered results
uses: actions/upload-artifact@v3
if: always()
--log-raw wpt-full-logs/macos-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.log \
--log-raw-unexpected wpt-filtered-logs/macos-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.log \
--filter-intermittents wpt-filtered-logs/macos-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.json
- name: Archive results (filtered)
uses: actions/upload-artifact@v4
with:
name: wpt-filtered-results-mac-${{ inputs.wpt-layout }}
path: |
filtered-test-wpt.${{ matrix.chunk_id }}.json
unexpected-test-wpt.${{ matrix.chunk_id }}.log
- name: Archive logs
uses: actions/upload-artifact@v3
name: wpt-filtered-logs-macos-${{ inputs.wpt-layout }}-${{ matrix.chunk_id }}
path: wpt-filtered-logs/*/
- name: Archive results (full)
uses: actions/upload-artifact@v4
if: failure()
with:
name: wpt-logs-mac-${{ inputs.wpt-layout }}
path: |
test-wpt.${{ matrix.chunk_id }}.log
filtered-wpt-results.${{ matrix.chunk_id }}.json
name: wpt-full-logs-macos-${{ inputs.wpt-layout }}-${{ matrix.chunk_id }}
path: wpt-full-logs/*/

report-test-results:
name: Reporting test results
name: Process WPT Results
runs-on: ubuntu-latest
if: ${{ always() && !cancelled() }}
needs: [ mac-wpt ]
if: ${{ always() }}
needs: mac-wpt
steps:
- name: Merge logs (filtered)
uses: actions/upload-artifact/merge@v4
with:
name: wpt-filtered-logs-macos-${{ inputs.wpt-layout }}
pattern: wpt-filtered-logs-macos-${{ inputs.wpt-layout }}-*
delete-merged: true
- name: Merge logs (full)
if: ${{ always() && contains(needs.*.result, 'failure') }}
uses: actions/upload-artifact/merge@v4
with:
name: wpt-full-logs-macos-${{ inputs.wpt-layout }}
pattern: wpt-full-logs-macos-${{ inputs.wpt-layout }}-*
delete-merged: true
- uses: actions/checkout@v3
if: !cancelled()
with:
fetch-depth: 2
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
if: !cancelled()
with:
name: wpt-filtered-results-mac-${{ inputs.wpt-layout }}
path: wpt-filtered-results-mac
- name: Create aggregated unexpected results
run: cat wpt-filtered-results-mac/*.log > unexpected-test-wpt.log
- name: Archive aggregate results
uses: actions/upload-artifact@v3
with:
name: wpt-filtered-results-mac-${{ inputs.wpt-layout }}
path: |
unexpected-test-wpt.log
- name: Comment on PR with results
run: etc/ci/report_aggregated_expected_results.py --tag="mac-wpt-${{ inputs.wpt-layout }}"
wpt-filtered-results-mac/*.json
name: wpt-filtered-logs-macos-${{ inputs.wpt-layout }}
path: results
- name: Report results
if: !cancelled()
run: |
etc/ci/report_aggregated_expected_results.py \
--tag="macos-wpt-${{ inputs.wpt-layout }}" \
results/macos-${{ inputs.wpt-layout }}/*.json
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
- name: Build (${{ inputs.profile }})
run: |
python3 ./mach build --${{ inputs.profile }}
cp -r target/cargo-timings target/cargo-timings-macos
- name: Smoketest
uses: nick-fields/retry@v2
with: # See https://github.com/servo/servo/issues/30757
Expand All @@ -117,16 +118,14 @@ jobs:
timeout_minutes: 5
max_attempts: 2
command: ./etc/ci/macos_package_smoketest.sh target/${{ inputs.profile }}/servo-tech-demo.dmg
- name: Rename build timing
run: cp -r target/cargo-timings target/cargo-timings-macos
- name: Archive build timing
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cargo-timings
name: cargo-timings-macos
# Using a wildcard here ensures that the archive includes the path.
path: target/cargo-timings-*
- name: Upload artifact for mach package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mac
path: target/${{ inputs.profile }}/servo-tech-demo.dmg
Expand All @@ -143,9 +142,9 @@ jobs:
- name: Build package for target
run: gtar -czf target.tar.gz target/${{ inputs.profile }}/servo target/${{ inputs.profile }}/lib/*.dylib resources
- name: Upload package for target
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release-binary-macos
name: ${{ inputs.profile }}-binary-macos
path: target.tar.gz

wpt-2020:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@ jobs:
profile: "release"
secrets: inherit

merge-build-timings:
name: Merge Build Timings
runs-on: ubuntu-latest
if: ${{ always() }}
needs:
- "build-win"
- "build-mac"
- "build-linux"
- "build-android"
steps:
- name: Merge
uses: actions/upload-artifact/merge@v4
with:
name: cargo-timings
pattern: cargo-timings-*

build-result:
name: Result
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit ebce988

Please sign in to comment.