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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.wave text eol=lf linguist-language=Wave
*.rs text eol=lf
*.ps1 linguist-vendored
*.sh linguist-vendored
Makefile linguist-vendored
Expand Down
220 changes: 217 additions & 3 deletions .github/workflows/asmobj.yml

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,17 @@ jobs:

workspace:
needs: asmobj
name: Workspace coverage
name: Rust adapter coverage with actual Wave modules
runs-on: ubuntu-24.04
timeout-minutes: 30
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/x86_64-unknown-linux-gnu
WHALE_WAVE_IR_DIR: ${{ github.workspace }}/.ci-wave/ir
WHALE_WAVE_ASSEMBLER_DIR: ${{ github.workspace }}/.ci-wave/common
WHALE_WAVE_AMD64_DIR: ${{ github.workspace }}/.ci-wave/amd64
WHALE_WAVE_AARCH64_DIR: ${{ github.workspace }}/.ci-wave/aarch64
WHALE_WAVE_RISCV64_DIR: ${{ github.workspace }}/.ci-wave/riscv64
WHALE_WAVE_LOONGARCH64_DIR: ${{ github.workspace }}/.ci-wave/loongarch64
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
Expand All @@ -40,6 +46,11 @@ jobs:
with:
name: ${{ needs.asmobj.outputs.artifact_name }}
path: .ci-asmobj
- name: Download selected Linux AMD64 Wave modules
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.wave_artifact_name }}
path: .ci-wave
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
Expand Down
28 changes: 25 additions & 3 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,58 @@ concurrency:
cancel-in-progress: true

jobs:
asmobj:
name: Build validated Linux Wave modules
uses: ./.github/workflows/asmobj.yml

mutation:
needs: asmobj
name: ${{ matrix.target }} / bounded mutation
runs-on: ubuntu-24.04
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
target: [assembler, object]
target: [assembler, object, ir, ast, bytecode]
env:
RUSTUP_TOOLCHAIN: stable
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/x86_64-unknown-linux-gnu
WHALE_WAVE_IR_DIR: ${{ github.workspace }}/.ci-wave/ir
WHALE_WAVE_ASSEMBLER_DIR: ${{ github.workspace }}/.ci-wave/common
WHALE_WAVE_AMD64_DIR: ${{ github.workspace }}/.ci-wave/amd64
WHALE_WAVE_AARCH64_DIR: ${{ github.workspace }}/.ci-wave/aarch64
WHALE_WAVE_RISCV64_DIR: ${{ github.workspace }}/.ci-wave/riscv64
WHALE_WAVE_LOONGARCH64_DIR: ${{ github.workspace }}/.ci-wave/loongarch64
WHALE_FUZZ_ARTIFACT_DIR: .ci-artifacts/fuzz
CASES: ${{ github.event_name == 'schedule' && '50000' || '512' }}
SEED: '1464353100'
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
- name: Download selected Linux AMD64 Wave modules
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.wave_artifact_name }}
path: .ci-wave
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
- run: rustup toolchain install stable --profile minimal
- name: Build real library boundary targets
run: python tools/ci.py run --name fuzz-build --timeout 300 -- cargo build --all-features --locked --example fuzz_boundaries
run: python tools/ci.py run --name fuzz-build --timeout 300 -- cargo build --features socket-cli --locked --example fuzz_boundaries
- name: Execute nonempty corpus and bounded mutations
run: python tools/ci.py run --name fuzz-${{ matrix.target }} --timeout 330 -- python tools/fuzz_smoke.py --binary target/debug/examples/fuzz_boundaries --target ${{ matrix.target }} --cases "$CASES" --seed "$SEED" --timeout 300 --memory-mib 512
- name: Retain logs, original failures, minimized inputs and replay commands
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: fuzz-${{ matrix.target }}-${{ github.run_id }}
name: fuzz-${{ matrix.target }}-${{ github.run_id }}-${{ github.run_attempt }}
path: .ci-artifacts/
include-hidden-files: true
if-no-files-found: error
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ jobs:
timeout-minutes: 25
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/x86_64-unknown-linux-gnu
WHALE_WAVE_IR_DIR: ${{ github.workspace }}/.ci-wave/ir
WHALE_WAVE_ASSEMBLER_DIR: ${{ github.workspace }}/.ci-wave/common
WHALE_WAVE_AMD64_DIR: ${{ github.workspace }}/.ci-wave/amd64
WHALE_WAVE_AARCH64_DIR: ${{ github.workspace }}/.ci-wave/aarch64
WHALE_WAVE_RISCV64_DIR: ${{ github.workspace }}/.ci-wave/riscv64
WHALE_WAVE_LOONGARCH64_DIR: ${{ github.workspace }}/.ci-wave/loongarch64
RUSTUP_TOOLCHAIN: beta
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
Expand All @@ -68,6 +74,11 @@ jobs:
with:
name: ${{ needs.asmobj.outputs.artifact_name }}
path: .ci-asmobj
- name: Download selected Linux AMD64 Wave modules
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.wave_artifact_name }}
path: .ci-wave
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
Expand Down
60 changes: 54 additions & 6 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ jobs:
features: [default, all]
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/x86_64-unknown-linux-gnu
WHALE_WAVE_IR_DIR: ${{ github.workspace }}/.ci-wave/ir
WHALE_WAVE_ASSEMBLER_DIR: ${{ github.workspace }}/.ci-wave/common
WHALE_WAVE_AMD64_DIR: ${{ github.workspace }}/.ci-wave/amd64
WHALE_WAVE_AARCH64_DIR: ${{ github.workspace }}/.ci-wave/aarch64
WHALE_WAVE_RISCV64_DIR: ${{ github.workspace }}/.ci-wave/riscv64
WHALE_WAVE_LOONGARCH64_DIR: ${{ github.workspace }}/.ci-wave/loongarch64
FEATURE_FLAGS: ${{ matrix.features == 'all' && '--all-features' || '' }}
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
Expand All @@ -69,6 +75,11 @@ jobs:
with:
name: ${{ needs.asmobj.outputs.artifact_name }}
path: .ci-asmobj
- name: Download selected Linux AMD64 Wave modules
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.wave_artifact_name }}
path: .ci-wave
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
Expand All @@ -95,13 +106,21 @@ jobs:
fail-fast: false
matrix:
include:
- { name: none, flags: '' }
- { name: amd64, flags: '--features asm-amd64' }
- { name: aarch64, flags: '--features asm-aarch64' }
- { name: riscv64, flags: '--features asm-riscv64' }
- { name: loongarch64, flags: '--features asm-loongarch64' }
- { name: none, flags: '', graph_flags: '' }
- { name: bytecode-only, flags: '--features socket-cli', graph_flags: '' }
- { name: all-isa-no-linker, flags: '--features builtin-assemblers,socket-cli', graph_flags: '--isa amd64 --isa aarch64 --isa riscv64 --isa loongarch64' }
- { name: amd64, flags: '--features asm-amd64', graph_flags: '--isa amd64' }
- { name: aarch64, flags: '--features asm-aarch64', graph_flags: '--isa aarch64' }
- { name: riscv64, flags: '--features asm-riscv64', graph_flags: '--isa riscv64' }
- { name: loongarch64, flags: '--features asm-loongarch64', graph_flags: '--isa loongarch64' }
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/x86_64-unknown-linux-gnu
WHALE_WAVE_IR_DIR: ${{ github.workspace }}/.ci-wave/ir
WHALE_WAVE_ASSEMBLER_DIR: ${{ github.workspace }}/.ci-wave/common
WHALE_WAVE_AMD64_DIR: ${{ github.workspace }}/.ci-wave/amd64
WHALE_WAVE_AARCH64_DIR: ${{ github.workspace }}/.ci-wave/aarch64
WHALE_WAVE_RISCV64_DIR: ${{ github.workspace }}/.ci-wave/riscv64
WHALE_WAVE_LOONGARCH64_DIR: ${{ github.workspace }}/.ci-wave/loongarch64
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
Expand All @@ -111,9 +130,16 @@ jobs:
with:
name: ${{ needs.asmobj.outputs.artifact_name }}
path: .ci-asmobj
- name: Download selected Linux AMD64 Wave modules
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.wave_artifact_name }}
path: .ci-wave
- run: rustup toolchain install stable --profile minimal
- name: Check selected assembler registration and integration
run: python tools/ci.py run --name reduced-isa -- cargo test -p whale --no-default-features ${{ matrix.flags }} --locked
- name: Check selected production dependency graph
run: python tools/ci.py run --name product-graph -- python tools/check_product_graph.py ${{ matrix.graph_flags }}
- name: Retain command logs and reproduction evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
Expand All @@ -131,6 +157,12 @@ jobs:
timeout-minutes: 15
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/x86_64-unknown-linux-gnu
WHALE_WAVE_IR_DIR: ${{ github.workspace }}/.ci-wave/ir
WHALE_WAVE_ASSEMBLER_DIR: ${{ github.workspace }}/.ci-wave/common
WHALE_WAVE_AMD64_DIR: ${{ github.workspace }}/.ci-wave/amd64
WHALE_WAVE_AARCH64_DIR: ${{ github.workspace }}/.ci-wave/aarch64
WHALE_WAVE_RISCV64_DIR: ${{ github.workspace }}/.ci-wave/riscv64
WHALE_WAVE_LOONGARCH64_DIR: ${{ github.workspace }}/.ci-wave/loongarch64
RUSTDOCFLAGS: -D warnings
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
Expand All @@ -141,6 +173,11 @@ jobs:
with:
name: ${{ needs.asmobj.outputs.artifact_name }}
path: .ci-asmobj
- name: Download selected Linux AMD64 Wave modules
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.wave_artifact_name }}
path: .ci-wave
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
Expand Down Expand Up @@ -196,6 +233,12 @@ jobs:
timeout-minutes: 20
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/x86_64-unknown-linux-gnu
WHALE_WAVE_IR_DIR: ${{ github.workspace }}/.ci-wave/ir
WHALE_WAVE_ASSEMBLER_DIR: ${{ github.workspace }}/.ci-wave/common
WHALE_WAVE_AMD64_DIR: ${{ github.workspace }}/.ci-wave/amd64
WHALE_WAVE_AARCH64_DIR: ${{ github.workspace }}/.ci-wave/aarch64
WHALE_WAVE_RISCV64_DIR: ${{ github.workspace }}/.ci-wave/riscv64
WHALE_WAVE_LOONGARCH64_DIR: ${{ github.workspace }}/.ci-wave/loongarch64
WHALE_FUZZ_ARTIFACT_DIR: .ci-artifacts/fuzz
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
Expand All @@ -206,6 +249,11 @@ jobs:
with:
name: ${{ needs.asmobj.outputs.artifact_name }}
path: .ci-asmobj
- name: Download selected Linux AMD64 Wave modules
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.wave_artifact_name }}
path: .ci-wave
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
Expand All @@ -215,7 +263,7 @@ jobs:
- name: Build real library boundary targets
run: python tools/ci.py run --name fuzz-build --timeout 300 -- cargo build --workspace --all-features --examples --locked
- name: Bounded assembler, object, IR and AST mutation targets
run: python tools/ci.py run --name boundary-fuzz --timeout 240 -- python tools/fuzz_smoke.py --binary target/debug/examples/fuzz_boundaries --cases 512 --seed 1464353100 --timeout 45
run: python tools/ci.py run --name boundary-fuzz --timeout 300 -- python tools/fuzz_smoke.py --binary target/debug/examples/fuzz_boundaries --cases 512 --seed 1464353100 --timeout 45
- name: Versioned schema and decoder agreement
run: python tools/ci.py run --name schema-agreement --timeout 90 -- python tools/schema_agreement.py --binary target/debug/examples/schema_probe
- name: Independent tracked-memory operation model
Expand Down
45 changes: 42 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ jobs:
version: ${{ steps.identity.outputs.version }}
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/x86_64-unknown-linux-gnu
WHALE_WAVE_IR_DIR: ${{ github.workspace }}/.ci-wave/ir
WHALE_WAVE_ASSEMBLER_DIR: ${{ github.workspace }}/.ci-wave/common
WHALE_WAVE_AMD64_DIR: ${{ github.workspace }}/.ci-wave/amd64
WHALE_WAVE_AARCH64_DIR: ${{ github.workspace }}/.ci-wave/aarch64
WHALE_WAVE_RISCV64_DIR: ${{ github.workspace }}/.ci-wave/riscv64
WHALE_WAVE_LOONGARCH64_DIR: ${{ github.workspace }}/.ci-wave/loongarch64
steps:
- name: Check input syntax before checkout
env:
Expand All @@ -65,6 +71,11 @@ jobs:
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
- name: Download native Wave source modules
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.wave_artifact_name }}
path: .ci-wave
- name: Validate exact commit, Cargo version and existing tag
id: identity
env:
Expand Down Expand Up @@ -95,21 +106,33 @@ jobs:
- os: ubuntu-24.04
host: x86_64-unknown-linux-gnu
binary: target/release/whale
features: socket-cli
package_flags: --require-wave
- os: ubuntu-24.04-arm
host: aarch64-unknown-linux-gnu
binary: target/release/whale
features: socket-cli,rust-reference
package_flags: ''
- os: macos-15-intel
host: x86_64-apple-darwin
binary: target/release/whale
features: socket-cli,rust-reference
package_flags: ''
- os: macos-15
host: aarch64-apple-darwin
binary: target/release/whale
features: socket-cli,rust-reference
package_flags: ''
- os: windows-2025
host: x86_64-pc-windows-msvc
binary: target/release/whale.exe
features: socket-cli,rust-reference
package_flags: ''
- os: windows-11-arm
host: aarch64-pc-windows-msvc
binary: target/release/whale.exe
features: socket-cli,rust-reference
package_flags: ''
env:
WHALE_ASMOBJ_DIR: ${{ github.workspace }}/.ci-asmobj/${{ matrix.host }}
SOURCE: ${{ needs.source.outputs.source }}
Expand All @@ -125,18 +148,34 @@ jobs:
with:
name: ${{ needs.asmobj.outputs.artifact_name }}
path: .ci-asmobj
- name: Download validated native Wave source modules
if: matrix.host == 'x86_64-unknown-linux-gnu'
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.asmobj.outputs.wave_artifact_name }}
path: .ci-wave
- name: Select the native Wave product
if: matrix.host == 'x86_64-unknown-linux-gnu'
shell: bash
run: |
echo "WHALE_WAVE_IR_DIR=$GITHUB_WORKSPACE/.ci-wave/ir" >> "$GITHUB_ENV"
echo "WHALE_WAVE_ASSEMBLER_DIR=$GITHUB_WORKSPACE/.ci-wave/common" >> "$GITHUB_ENV"
for module in AMD64 AARCH64 RISCV64 LOONGARCH64; do
directory=$(echo "$module" | tr '[:upper:]' '[:lower:]')
echo "WHALE_WAVE_${module}_DIR=$GITHUB_WORKSPACE/.ci-wave/$directory" >> "$GITHUB_ENV"
done
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.13'
- run: rustup toolchain install stable-${{ matrix.host }} --profile minimal
- run: python tools/ci.py host --expected ${{ matrix.host }}
- run: python tools/ci.py run --name build -- cargo build --release --workspace --all-features --locked
- run: python tools/ci.py run --name build -- cargo build --release --workspace --features ${{ matrix.features }} --locked
- name: Test each native package producer
run: python -m unittest discover -s tools -p test_release.py -v
- name: Create deterministic native archive
run: python tools/release.py package --binary ${{ matrix.binary }} --directory dist --target ${{ matrix.host }} --version ${{ env.VERSION }} --source ${{ env.SOURCE }} --socket-cli
run: python tools/release.py package --binary ${{ matrix.binary }} --directory dist --target ${{ matrix.host }} --version ${{ env.VERSION }} --source ${{ env.SOURCE }} --socket-cli ${{ matrix.package_flags }}
- name: Execute the extracted binary outside the checkout
run: python tools/release.py validate --directory dist --target ${{ matrix.host }} --version ${{ env.VERSION }} --source ${{ env.SOURCE }}
run: python tools/release.py validate --directory dist --target ${{ matrix.host }} --version ${{ env.VERSION }} --source ${{ env.SOURCE }} ${{ matrix.package_flags }}
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: release-${{ github.run_id }}-${{ matrix.host }}
Expand Down
Loading
Loading