Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions .github/workflows/cases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,32 @@ jobs:
echo "/usr/lib/llvm-21/bin" >> "$GITHUB_PATH"

- name: Install Wave standard library
id: install_std
run: |
mkdir -p "$HOME/.wave/lib/wave"
rm -rf "$HOME/.wave/lib/wave/std"
cp -R std "$HOME/.wave/lib/wave/std"

- name: Build release compiler
id: build_compiler
run: cargo build --locked --release --jobs 2

- name: Check every target case
if: ${{ matrix.id == 'linux-amd64' }}
run: |
set -euo pipefail
mapfile -t cases < <(python3 tools/case_manifest.py sources)
for source in "${cases[@]}"; do
target/release/wavec check "tests/cases/$source"
done
run: >-
python3 tools/check_case_sources.py --wavec target/release/wavec
--report-json wave-source-checks.json

- name: Upload source check report
if: ${{ always() && matrix.id == 'linux-amd64' }}
uses: actions/upload-artifact@v4
with:
name: wave-source-checks
path: wave-source-checks.json
if-no-files-found: warn

- name: Run all Wave cases
if: ${{ !cancelled() && steps.install_std.outcome == 'success' && steps.build_compiler.outcome == 'success' }}
run: >-
python3 tools/run_tests.py --target-id "${{ matrix.id }}"
--report-json wave-cases-${{ matrix.id }}.json
Expand Down Expand Up @@ -345,21 +353,32 @@ jobs:
New-Item -ItemType Directory -Force -Path $libraryRoot | Out-Null
Copy-Item -Path std -Destination (Join-Path $libraryRoot "std") -Recurse

# An explicit Cargo target keeps +crt-static off host build scripts.
# llvm-sys 211 tests its own cfg!(crt-static) when classifying SDK
# import libraries; applying target flags to that script requests
# static bundling of psapi instead of leaving it for the MSVC linker.
- name: Build native ARM64 compiler
run: >-
cargo build --locked --release --no-default-features
cargo build --locked --verbose --release --target aarch64-pc-windows-msvc
--no-default-features
--features llvm-target-aarch64 --jobs 2

- name: Verify native compiler architecture
shell: pwsh
run: |
$compiler = "target\release\wavec.exe"
$compiler = "target\aarch64-pc-windows-msvc\release\wavec.exe"
$bytes = [System.IO.File]::ReadAllBytes($compiler)
$peOffset = [BitConverter]::ToInt32($bytes, 0x3c)
if ([BitConverter]::ToUInt16($bytes, $peOffset + 4) -ne 0xaa64) {
throw "wavec.exe is not an ARM64 PE image"
}

- name: Stage verified compiler for the case runner
shell: pwsh
run: |
New-Item -ItemType Directory -Force target/release | Out-Null
Copy-Item target/aarch64-pc-windows-msvc/release/wavec.exe target/release/wavec.exe -Force

- name: Run all Wave cases
run: >-
python tools/run_tests.py --target-id "${{ matrix.id }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
- name: Validate Python tooling
run: |
python3 -m py_compile x.py tools/check_wave_corpus.py tools/case_manifest.py tools/populate_case_matrix.py tools/run_tests.py tools/test_contracts.py tools/test_case_manifest.py tools/test_test_contracts.py
python3 -m unittest tools.test_case_manifest tools.test_test_contracts
python3 -m unittest tools.test_check_case_sources tools.test_case_execution tools.test_case_manifest tools.test_test_contracts

- name: Run Rust tests
run: cargo test --locked --all-targets --verbose
Expand Down
28 changes: 21 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Validate Python tooling
run: |
python3 -m py_compile x.py tools/check_wave_corpus.py tools/case_manifest.py tools/populate_case_matrix.py tools/run_tests.py tools/test_contracts.py tools/test_case_manifest.py tools/test_test_contracts.py tools/process_tree.py tools/test_process_tree.py
python3 -m unittest tools.test_case_manifest tools.test_test_contracts tools.test_process_tree
python3 -m unittest tools.test_check_case_sources tools.test_case_execution tools.test_case_manifest tools.test_test_contracts tools.test_process_tree

- name: Test Windows ARM64 dependency archive validation
shell: pwsh
Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:
- name: Validate Python tooling
run: |
python3 -m py_compile x.py tools/check_wave_corpus.py tools/case_manifest.py tools/populate_case_matrix.py tools/run_tests.py tools/test_contracts.py tools/test_case_manifest.py tools/test_test_contracts.py tools/process_tree.py tools/test_process_tree.py
python3 -m unittest tools.test_case_manifest tools.test_test_contracts tools.test_process_tree
python3 -m unittest tools.test_check_case_sources tools.test_case_execution tools.test_case_manifest tools.test_test_contracts tools.test_process_tree

- name: Build release compiler
run: cargo build --locked --release --verbose
Expand Down Expand Up @@ -304,7 +304,7 @@ jobs:
- name: Validate Python tooling
run: |
python3 -m py_compile x.py tools/check_wave_corpus.py tools/case_manifest.py tools/populate_case_matrix.py tools/run_tests.py tools/test_contracts.py tools/test_case_manifest.py tools/test_test_contracts.py tools/process_tree.py tools/test_process_tree.py
python3 -m unittest tools.test_case_manifest tools.test_test_contracts tools.test_process_tree
python3 -m unittest tools.test_check_case_sources tools.test_case_execution tools.test_case_manifest tools.test_test_contracts tools.test_process_tree

- name: Build release compiler
run: cargo build --locked --release --verbose
Expand Down Expand Up @@ -575,7 +575,7 @@ jobs:
- name: Validate Python tooling
run: |
python3 -m py_compile x.py tools/check_wave_corpus.py tools/case_manifest.py tools/populate_case_matrix.py tools/run_tests.py tools/test_contracts.py tools/test_case_manifest.py tools/test_test_contracts.py tools/process_tree.py tools/test_process_tree.py
python3 -m unittest tools.test_case_manifest tools.test_test_contracts tools.test_process_tree
python3 -m unittest tools.test_check_case_sources tools.test_case_execution tools.test_case_manifest tools.test_test_contracts tools.test_process_tree

- name: Build release compiler
run: cargo build --locked --release --verbose
Expand Down Expand Up @@ -640,7 +640,7 @@ jobs:
- name: Validate Python tooling
run: |
python3 -m py_compile x.py tools/check_wave_corpus.py tools/case_manifest.py tools/populate_case_matrix.py tools/run_tests.py tools/test_contracts.py tools/test_case_manifest.py tools/test_test_contracts.py tools/process_tree.py tools/test_process_tree.py
python3 -m unittest tools.test_case_manifest tools.test_test_contracts tools.test_process_tree
python3 -m unittest tools.test_check_case_sources tools.test_case_execution tools.test_case_manifest tools.test_test_contracts tools.test_process_tree

- name: Build release compiler
run: cargo build --locked --release --verbose
Expand Down Expand Up @@ -770,7 +770,7 @@ jobs:
PYTHONIOENCODING: "utf-8"
run: |
python -m py_compile x.py tools/check_wave_corpus.py tools/case_manifest.py tools/populate_case_matrix.py tools/run_tests.py tools/test_contracts.py tools/test_case_manifest.py tools/test_test_contracts.py tools/process_tree.py tools/test_process_tree.py
python -m unittest tools.test_case_manifest tools.test_test_contracts tools.test_process_tree
python -m unittest tools.test_check_case_sources tools.test_case_execution tools.test_case_manifest tools.test_test_contracts tools.test_process_tree

- name: Build release compiler
shell: msys2 {0}
Expand Down Expand Up @@ -951,7 +951,7 @@ jobs:
retention-days: 7

- name: Check native Windows process supervision
run: python -m unittest tools.test_process_tree
run: python -m unittest tools.test_check_case_sources tools.test_case_execution tools.test_process_tree

- name: Run native ARM64 unit and frontend driver tests
run: >-
Expand All @@ -965,10 +965,24 @@ jobs:
msvc_link_companions_keep_final_names_and_survive_failed_replacement

- name: Run native ARM64 MSVC executor restart regression
id: native_runtime
env:
WAVE_RUNTIME_ARTIFACT_DIR: ${{ runner.temp }}
run: >-
cargo test --locked --test runtime_regressions --target aarch64-pc-windows-msvc
--no-default-features --features llvm-target-aarch64 --jobs 2

- name: Save failed native runtime compiler and fixture
if: ${{ failure() && steps.native_runtime.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: windows-arm64-runtime-failure
path: |
target/aarch64-pc-windows-msvc/debug/wavec.exe
target/aarch64-pc-windows-msvc/debug/wavec.pdb
${{ runner.temp }}/wave-runtime-*/
retention-days: 7

- name: Install Wave stdlib
shell: pwsh
run: |
Expand Down
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,12 @@ The build, cases, and release workflows run
libxml2 2.13.9 from a SHA-256-pinned
[GNOME source archive](https://download.gnome.org/sources/libxml2/2.13/),
retaining the pre-2.14 XML ABI used by LLVM's static code. The build uses
native ARM64 clang-cl/MSVC tools, the DLL CRT used by default Rust MSVC
builds, and no optional iconv, compression, Python, or XML DLL dependencies.
native ARM64 clang-cl/MSVC tools and the static CRT matching the pinned LLVM
SDK, with no optional iconv, compression, Python, or XML DLL dependencies.
Use an explicit `--target aarch64-pc-windows-msvc` for native Cargo commands:
this keeps target CRT flags off host build scripts. In llvm-sys 211, applying
those flags to the build script changes Windows SDK import libraries such as
`psapi` into static-bundling requests before the final MSVC link.
It supplies the SDK's `xml2s.lib` name and the Windows `bcrypt`/`ws2_32`
imports, then checks every COFF archive member for machine `0xaa64` before
Cargo links it. Release packaging includes the libxml2 copyright notice.
Expand Down
Loading
Loading