-
Notifications
You must be signed in to change notification settings - Fork 2
103 lines (92 loc) · 3.61 KB
/
Copy path_integration-test.yml
File metadata and controls
103 lines (92 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Integration Test
on:
workflow_call:
inputs:
source-sha:
required: false
type: string
default: ""
runs-on:
required: true
type: string
jobs:
integration-test:
runs-on: ${{ inputs.runs-on }}
timeout-minutes: 30
defaults:
run:
shell: bash
env:
PYTHONIOENCODING: utf-8
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.source-sha || github.sha }}
- name: Verify checkout SHA
env:
EXPECTED_SHA: ${{ inputs.source-sha || github.sha }}
run: |
[[ "$EXPECTED_SHA" =~ ^[0-9a-f]{40}$ ]]
if [[ "$GITHUB_EVENT_NAME" == workflow_dispatch ]]; then
test "$EXPECTED_SHA" = "$GITHUB_SHA"
fi
test "$(git rev-parse HEAD)" = "$EXPECTED_SHA"
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: "3.11.9"
- name: Install Python
run: uv python install "$UV_PYTHON"
# Must run before setup-soldr: its soldr-cook step builds glib-sys /
# gobject-sys, which resolve GTK/WebKit through pkg-config. Cooking first
# fails with exit 101 and every run then compiles those deps cold (#262).
- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq libgtk-3-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev
- uses: zackees/setup-soldr@v0.9.62
env:
GITHUB_TOKEN: ${{ github.token }}
with:
# Windows ARM native tests hit 0.7.51's listener timeout and
# 0.7.53's pre-lock timeout. Try 0.9.21's embedded daemon; keep
# other runners and cross-builds on 0.7.51 (see #158).
version: ${{ inputs.runs-on == 'windows-11-arm' && '0.9.21' || '0.7.51' }}
# cache-preset: foundation expands to build-cache: true +
# target-cache: false + cargo-registry-cache: false +
# prebuild-deps: soldr-cook (setup-soldr v0.9.17+, #251).
cache-preset: foundation
# "-native" matches _build.yml's native-target suffix so lint, test,
# and native build jobs on the same runner share one cache namespace.
cache-key-suffix: ${{ inputs.runs-on }}-native
linker: platform-default
toolchain-file: rust-toolchain.toml
# `./test` runs `soldr cargo test --workspace` (dev/debug profile).
# Cook in debug so its prebuilt deps share the compile-cache key with
# the test compile; the default `--release` cook is zero-reuse here
# and only bloats the build-cache (setup-soldr#235).
prebuild-deps-flags: ""
- name: Sync Python deps
run: uv sync --group dev
- name: Native Test Suite
run: ./test
- name: Capture Soldr failure diagnostics
if: failure() && inputs.runs-on == 'windows-11-arm'
continue-on-error: true
shell: pwsh
run: ./ci/capture_soldr_failure.ps1
- name: Upload Soldr failure diagnostics
if: failure() && inputs.runs-on == 'windows-11-arm'
uses: actions/upload-artifact@v4
with:
name: soldr-failure-diagnostics-integration-test-${{ inputs.runs-on }}-${{ github.run_attempt }}
path: soldr-failure-diagnostics/**
if-no-files-found: error
- name: Upload failure logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: failure-logs-integration-test-${{ inputs.runs-on }}
path: logs/*
if-no-files-found: warn