-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (98 loc) · 3.52 KB
/
Copy pathcurrent.yml
File metadata and controls
98 lines (98 loc) · 3.52 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
name: Native provider artifacts
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: native-provider-${{ github.ref }}
cancel-in-progress: true
jobs:
libcst:
name: LibCST installed artifacts (Python ${{ matrix.python }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python: ['3.10', '3.14']
env:
CARGO_BUILD_JOBS: '1'
CARGO_TARGET_DIR: ${{ github.workspace }}/kernel/tmp/native-provider-target
CARGO_INCREMENTAL: '0'
CARGO_PROFILE_DEV_DEBUG: '0'
CARGO_PROFILE_TEST_DEBUG: '0'
PYTHONDONTWRITEBYTECODE: '1'
PIP_NO_CACHE_DIR: '1'
steps:
- name: Checkout native layer
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: native
- name: Checkout kernel dependency head
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: structuredmerge/structuredmerge
ref: main
path: kernel
- name: Set up Rust
uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772
with:
toolchain: stable
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: ${{ matrix.python }}
- name: Build checked-in generated core binding
working-directory: kernel/packages/python
shell: bash
run: |
set -euo pipefail
ulimit -c 0
mkdir -p ../../tmp
export TMPDIR="$GITHUB_WORKSPACE/kernel/tmp"
python -m pip install 'maturin>=1,<2'
python -m maturin build --locked --out ../../tmp/core-wheels --profile dev -j 1
- name: Verify native archive and cleanup guards
working-directory: native
run: python -m unittest discover -s scripts/tests -v
- name: Build native source distribution and verify installed wheels
working-directory: native
shell: bash
run: |
set -euo pipefail
ulimit -c 0
mkdir -p tmp
export TMPDIR="$PWD/tmp"
core_wheels=(../kernel/tmp/core-wheels/*.whl)
test "${#core_wheels[@]}" -eq 1
python scripts/check_artifacts.py --core-wheel "${core_wheels[0]}"
- name: Run kernel boundary and generated suites using the installed provider
working-directory: kernel
shell: bash
run: |
set -euo pipefail
ulimit -c 0
export TMPDIR="$PWD/tmp"
provider_wheels=(../native/tmp/libcst-artifact-*/dist/structuredmerge_libcst-*.whl)
test "${#provider_wheels[@]}" -eq 1
python workspace-scripts/check_core_python_artifact.py tmp/core-wheels --provider-wheel "${provider_wheels[0]}"
- name: Retain reports and native artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: libcst-native-python-${{ matrix.python }}
path: |
native/tmp/libcst-artifact-*/report.json
native/tmp/libcst-artifact-*/dist/*
kernel/tmp/core-python-artifact-*/report.json
if-no-files-found: warn
- name: Remove disposable compiler output
if: always()
shell: bash
run: |
if [ -d kernel/tmp/native-provider-target ]; then
rm -r -- kernel/tmp/native-provider-target
fi