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
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.wave linguist-language=Wave
*.wave text eol=lf linguist-language=Wave
*.ps1 linguist-vendored
*.sh linguist-vendored
Makefile linguist-vendored
Expand Down
105 changes: 105 additions & 0 deletions .github/workflows/asmobj.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Build complete Wave asmobj module

on:
workflow_call:
inputs:
source:
description: Exact Whale source to build; defaults to the caller commit
type: string
required: false
default: ''
outputs:
artifact_name:
description: Exact archive artifact published by this prerequisite job
value: ${{ jobs.archives.outputs.artifact_name }}

permissions:
contents: read

jobs:
archives:
name: Wave asmobj archives and Linux conformance
runs-on: ubuntu-24.04
timeout-minutes: 40
outputs:
artifact_name: asmobj-${{ github.run_id }}-${{ github.run_attempt }}
env:
CARGO_INCREMENTAL: '0'
CARGO_BUILD_JOBS: '2'
RUSTUP_TOOLCHAIN: stable
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
ref: ${{ inputs.source || github.sha }}
persist-credentials: false
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
repository: wavefnd/Wave
ref: e0952ed65d07e14c6ed0aa64f3c9a5532dd7533b
path: .asmobj-bootstrap-source
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
- name: Install pinned compiler prerequisites
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y wget software-properties-common ninja-build
wget --tries=3 --timeout=30 https://apt.llvm.org/llvm.sh -O "$RUNNER_TEMP/llvm.sh"
sudo bash "$RUNNER_TEMP/llvm.sh" 21
sudo apt-get install --no-install-recommends -y llvm-21-dev lld-21
printf '%s\n' \
'LLVM_SYS_211_PREFIX=/usr/lib/llvm-21' \
'LLVM_CONFIG_PATH=/usr/lib/llvm-21/bin/llvm-config' \
'AR=/usr/lib/llvm-21/bin/llvm-ar' >> "$GITHUB_ENV"
echo "/usr/lib/llvm-21/bin" >> "$GITHUB_PATH"
rustup toolchain install 1.89.0 --profile minimal
rustup toolchain install stable --profile minimal
- name: Build each archive from the same complete source module
run: |
for target in \
x86_64-unknown-linux-gnu \
aarch64-unknown-linux-gnu \
riscv64gc-unknown-linux-gnu \
x86_64-pc-windows-msvc \
aarch64-pc-windows-msvc \
x86_64-apple-darwin \
aarch64-apple-darwin; do
python3 tools/build_asmobj.py --wave-source .asmobj-bootstrap-source \
--bootstrap-dir "$RUNNER_TEMP/asmobj-bootstrap" --rust-toolchain 1.89.0 \
--out-dir ".ci-asmobj/$target" --target "$target" --allow-network
done
- name: Compare native Linux O0 and O2 with the independent oracle
run: |
python3 tools/build_asmobj.py --wave-source .asmobj-bootstrap-source \
--bootstrap-dir "$RUNNER_TEMP/asmobj-bootstrap" --rust-toolchain 1.89.0 \
--out-dir "$RUNNER_TEMP/asmobj-o0" --opt-level 0
cc -shared -Wl,--whole-archive "$RUNNER_TEMP/asmobj-o0/libwhale_asmobj.a" \
-Wl,--no-whole-archive -o "$RUNNER_TEMP/asmobj-o0.so"
cc -shared -Wl,--whole-archive .ci-asmobj/x86_64-unknown-linux-gnu/libwhale_asmobj.a \
-Wl,--no-whole-archive -o "$RUNNER_TEMP/asmobj-o2.so"
asmobj_python="$(python3 -c 'import sys; print(sys.executable)')"
for optimization in 0 2; do
timeout 120s python3 tools/fuzz_limits.py --memory-mib 512 -- \
"$asmobj_python" tools/check_asmobj.py \
--library "$RUNNER_TEMP/asmobj-o$optimization.so" --cases 10000
done
- name: Build, test and install the Meson source product
run: |
python3 -m pip install --disable-pip-version-check meson==1.8.5
cargo fetch --locked
meson setup "$RUNNER_TEMP/whale-meson" \
-Dwave-source="$GITHUB_WORKSPACE/.asmobj-bootstrap-source" \
-Dwave-bootstrap-dir="$RUNNER_TEMP/asmobj-bootstrap" -Dsocket-cli=true
meson compile -C "$RUNNER_TEMP/whale-meson"
meson test -C "$RUNNER_TEMP/whale-meson" --print-errorlogs
DESTDIR="$RUNNER_TEMP/whale-meson-install" meson install -C "$RUNNER_TEMP/whale-meson"
"$RUNNER_TEMP/whale-meson-install/usr/local/bin/whale" --version
- name: Retain target-specific archives and provenance
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: asmobj-${{ github.run_id }}-${{ github.run_attempt }}
path: .ci-asmobj/
include-hidden-files: true
if-no-files-found: error
retention-days: 7
12 changes: 12 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,26 @@ env:
RUSTUP_TOOLCHAIN: stable

jobs:
asmobj:
name: Build Wave asmobj prerequisites
uses: ./.github/workflows/asmobj.yml

workspace:
needs: asmobj
name: Workspace coverage
runs-on: ubuntu-24.04
timeout-minutes: 30
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- name: Download complete Wave asmobj module
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.artifact_name }}
path: .ci-asmobj
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ env:
RUSTUP_TOOLCHAIN: stable

jobs:
asmobj:
name: Build Wave asmobj prerequisites
uses: ./.github/workflows/asmobj.yml

dependencies:
name: Dependency advisories and lockfile
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -48,15 +52,22 @@ jobs:
retention-days: 7

beta:
needs: asmobj
name: Rust beta compatibility
runs-on: ubuntu-24.04
timeout-minutes: 25
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/x86_64-unknown-linux-gnu
RUSTUP_TOOLCHAIN: beta
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- name: Download complete Wave asmobj module
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.artifact_name }}
path: .ci-asmobj
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ env:
RUSTUP_TOOLCHAIN: stable

jobs:
asmobj:
name: Build Wave asmobj prerequisites
uses: ./.github/workflows/asmobj.yml

format:
name: Rust formatting
runs-on: ubuntu-24.04
Expand All @@ -45,6 +49,7 @@ jobs:
retention-days: 7

clippy:
needs: asmobj
name: Clippy / ${{ matrix.features }}
runs-on: ubuntu-24.04
timeout-minutes: 20
Expand All @@ -53,11 +58,17 @@ jobs:
matrix:
features: [default, all]
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/x86_64-unknown-linux-gnu
FEATURE_FLAGS: ${{ matrix.features == 'all' && '--all-features' || '' }}
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- name: Download complete Wave asmobj module
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.artifact_name }}
path: .ci-asmobj
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
Expand All @@ -76,15 +87,22 @@ jobs:
retention-days: 7

docs:
needs: asmobj
name: Public crate documentation
runs-on: ubuntu-24.04
timeout-minutes: 15
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/x86_64-unknown-linux-gnu
RUSTDOCFLAGS: -D warnings
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- name: Download complete Wave asmobj module
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.artifact_name }}
path: .ci-asmobj
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
Expand Down Expand Up @@ -121,6 +139,8 @@ jobs:
run: python tools/ci.py run --name actionlint -- /tmp/actionlint -color
- name: Check CI helper failure handling
run: python tools/ci.py run --name runner-tests -- python -m unittest discover -s tools -p test_*.py -v
- name: Check core module dependency direction
run: python tools/ci.py run --name module-layers -- python tools/check_module_layers.py
- name: Retain command logs and reproduction evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
Expand All @@ -132,15 +152,22 @@ jobs:
retention-days: 7

bounded-validation:
needs: asmobj
name: Bounded fuzz, memory model and AST schemas
runs-on: ubuntu-24.04
timeout-minutes: 20
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/x86_64-unknown-linux-gnu
WHALE_FUZZ_ARTIFACT_DIR: .ci-artifacts/fuzz
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- name: Download complete Wave asmobj module
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.artifact_name }}
path: .ci-asmobj
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,22 @@ env:
CARGO_INCREMENTAL: '0'

jobs:
asmobj:
name: Build Wave asmobj prerequisites
uses: ./.github/workflows/asmobj.yml
with:
source: ${{ inputs.source }}

source:
needs: asmobj
name: Validate release source
runs-on: ubuntu-24.04
timeout-minutes: 30
outputs:
source: ${{ steps.identity.outputs.source }}
version: ${{ steps.identity.outputs.version }}
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/x86_64-unknown-linux-gnu
steps:
- name: Check input syntax before checkout
env:
Expand All @@ -48,6 +57,11 @@ jobs:
ref: ${{ inputs.source }}
fetch-depth: 0
persist-credentials: false
- name: Download complete Wave asmobj module
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.artifact_name }}
path: .ci-asmobj
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
Expand All @@ -71,7 +85,7 @@ jobs:

package:
name: Package ${{ matrix.host }}
needs: source
needs: [source, asmobj]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
Expand All @@ -97,6 +111,7 @@ jobs:
host: aarch64-pc-windows-msvc
binary: target/release/whale.exe
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/${{ matrix.host }}
SOURCE: ${{ needs.source.outputs.source }}
VERSION: ${{ needs.source.outputs.version }}
RUSTUP_TOOLCHAIN: stable-${{ matrix.host }}
Expand All @@ -105,6 +120,11 @@ jobs:
with:
ref: ${{ needs.source.outputs.source }}
persist-credentials: false
- name: Download complete Wave asmobj module
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.artifact_name }}
path: .ci-asmobj
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
Expand Down
Loading
Loading