fix(simulator): a wide unbased-literal ('1) ternary branch dropped its high words #7009
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Regression | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| rust: stable | |
| target: x86_64-unknown-linux-gnu | |
| - os: ubuntu-24.04-arm | |
| rust: stable | |
| target: aarch64-unknown-linux-gnu | |
| - os: macOS-latest | |
| rust: stable | |
| target: aarch64-apple-darwin | |
| - os: windows-latest | |
| rust: stable | |
| target: x86_64-pc-windows-msvc | |
| - os: windows-11-arm | |
| rust: stable | |
| target: aarch64-pc-windows-msvc | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| CARGO_INCREMENTAL: "0" | |
| SCCACHE_CACHE_SIZE: "3G" | |
| SCCACHE_DIR: ${{ github.workspace }}/.sccache | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| # wasm32 std lets the wasm component transport tests build their | |
| # guest fixture; without it they skip silently. | |
| targets: ${{ matrix.target }}, wasm32-unknown-unknown | |
| # rust-cache caches ~/.cargo and target/ (dependency compilation) so cargo | |
| # skips deps; sccache (content-addressed) then serves the workspace crates, | |
| # which rust-cache alone cannot reuse across runs (cargo's mtime fingerprints | |
| # break after checkout). The key is distinct because building under sccache | |
| # changes every crate's fingerprint. Master saves; PRs restore read-only. | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ${{ matrix.target }}-sccache | |
| save-if: ${{ github.ref == 'refs/heads/master' }} | |
| - uses: mozilla-actions/sccache-action@v0.0.10 | |
| with: | |
| # stats stay in the job log via the explicit step below; keep them off | |
| # the run-summary annotations | |
| disable_annotations: true | |
| - uses: actions/cache/restore@v4 | |
| continue-on-error: true | |
| with: | |
| path: ${{ github.workspace }}/.sccache | |
| key: sccache-${{ matrix.target }}-${{ github.sha }} | |
| restore-keys: sccache-${{ matrix.target }}- | |
| - name: Run tests | |
| run: cargo test --locked --target ${{ matrix.target }} | |
| - name: sccache stats | |
| if: always() | |
| run: sccache --show-stats | |
| - uses: actions/cache/save@v4 | |
| if: github.ref == 'refs/heads/master' | |
| continue-on-error: true | |
| with: | |
| path: ${{ github.workspace }}/.sccache | |
| key: sccache-${{ matrix.target }}-${{ github.sha }} | |
| gen_sv: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: gen_sv | |
| save-if: ${{ github.ref == 'refs/heads/master' }} | |
| - name: Run gen_sv | |
| run: make gen_sv | |
| - name: Check gen_sv | |
| run: git diff --exit-code | |
| rustfmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Run rustfmt | |
| run: cargo fmt -- --check | |
| clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: clippy | |
| save-if: ${{ github.ref == 'refs/heads/master' }} | |
| - name: Run clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| # Build the release-verylup veryl binary once and share it via an artifact; | |
| # std / heliodor / cocotb consume it instead of each rebuilding (less redundant | |
| # compile + fewer heavy jobs competing for runners). | |
| build-veryl: | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| CARGO_INCREMENTAL: "0" | |
| SCCACHE_CACHE_SIZE: "3G" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| # Same rust-cache + sccache split as the build job above (deps via | |
| # rust-cache; workspace crates via sccache, under a distinct -sccache key). | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: build-veryl-sccache | |
| save-if: ${{ github.ref == 'refs/heads/master' }} | |
| - uses: mozilla-actions/sccache-action@v0.0.10 | |
| with: | |
| disable_annotations: true | |
| - uses: actions/cache/restore@v4 | |
| continue-on-error: true | |
| with: | |
| path: ~/.cache/sccache | |
| key: sccache-build-veryl-${{ github.sha }} | |
| restore-keys: sccache-build-veryl- | |
| - name: Build veryl | |
| run: cargo build --profile release-verylup --bin veryl | |
| - name: sccache stats | |
| if: always() | |
| run: sccache --show-stats | |
| - uses: actions/cache/save@v4 | |
| if: github.ref == 'refs/heads/master' | |
| continue-on-error: true | |
| with: | |
| path: ~/.cache/sccache | |
| key: sccache-build-veryl-${{ github.sha }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: veryl-release-verylup | |
| path: target/release-verylup/veryl | |
| retention-days: 1 | |
| std: | |
| needs: build-veryl | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: veryl-release-verylup | |
| path: target/release-verylup | |
| - run: chmod +x target/release-verylup/veryl | |
| - name: Setup verilator | |
| uses: veryl-lang/setup-verilator@v2 | |
| - name: Format check | |
| run: ../../../target/release-verylup/veryl fmt --check | |
| working-directory: crates/std/veryl | |
| - name: Build check | |
| run: ../../../target/release-verylup/veryl check | |
| working-directory: crates/std/veryl | |
| - name: Test | |
| run: ../../../target/release-verylup/veryl test --sim verilator | |
| working-directory: crates/std/veryl | |
| heliodor: | |
| needs: build-veryl | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: veryl-release-verylup | |
| path: target/release-verylup | |
| - run: chmod +x target/release-verylup/veryl | |
| - name: Test | |
| run: ../../target/release-verylup/veryl test | |
| working-directory: testcases/heliodor | |
| # The single-hart SoC Linux boot is #[ignore] (long); run it in its own job so | |
| # it runs in parallel with the main heliodor tests instead of serializing after | |
| # them. It runs on the built-in cc-backend simulator (not verilator). | |
| heliodor-boot: | |
| needs: build-veryl | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: veryl-release-verylup | |
| path: target/release-verylup | |
| - run: chmod +x target/release-verylup/veryl | |
| - name: Test Linux boot | |
| run: ../../target/release-verylup/veryl test --ignored --test test_soc_linux_boot | |
| working-directory: testcases/heliodor | |
| cocotb: | |
| needs: build-veryl | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: veryl-release-verylup | |
| path: target/release-verylup | |
| - run: chmod +x target/release-verylup/veryl | |
| - name: Setup verilator | |
| uses: veryl-lang/setup-verilator@v2 | |
| - name: Test cocotb 1.9.2 | |
| run: | | |
| pip install "cocotb==1.9.2" | |
| target/release-verylup/veryl test --sim verilator testcases/veryl/67_cocotb.veryl | |
| - name: Test cocotb 2.0.0 | |
| run: | | |
| pip install "cocotb==2.0.0" | |
| target/release-verylup/veryl test --sim verilator testcases/veryl/67_cocotb.veryl | |
| wasm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - uses: Swatinem/rust-cache@v2 | |
| continue-on-error: true | |
| with: | |
| shared-key: "${{ runner.os }}-wasm" | |
| save-if: ${{ github.ref == 'refs/heads/master' }} | |
| - name: Build for wasm | |
| run: cargo check --target wasm32-unknown-unknown -p veryl-emitter -p veryl-formatter -p veryl-simulator | |
| highlightgen: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: 'true' | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| continue-on-error: true | |
| with: | |
| shared-key: "${{ runner.os }}-highlightgen" | |
| save-if: ${{ github.ref == 'refs/heads/master' }} | |
| - name: Run highlightgen | |
| run: cargo run --bin highlightgen -- check |