Skip to content

fix(values): encode BoundedInt in its compact representation; deref boxed returns #8090

fix(values): encode BoundedInt in its compact representation; deref boxed returns

fix(values): encode BoundedInt in its compact representation; deref boxed returns #8090

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
merge_group:
types: [checks_requested]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
check:
name: clippy
runs-on: ubuntu-24.04
env:
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@1321684edfabb845e0bc37de117ff544adf0f648 # 1.84.1
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: add llvm deb repository
uses: myci-actions/add-deb-repo@43408b9f0225d1c64ba667d59e337c6140383bbe # 11
with:
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main
repo-name: llvm-repo
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- name: Install LLVM
run: sudo apt-get install llvm-19 llvm-19-dev llvm-19-runtime clang-19 clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools
- name: Compile Test Data
run: make compile-test-data
- name: Clippy
run: make check
fmt:
name: rustfmt
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: dtolnay/rust-toolchain@1321684edfabb845e0bc37de117ff544adf0f648 # 1.84.1
with:
components: rustfmt
- run: cargo fmt --all -- --check
- name: Find Comment
continue-on-error: true
if: success() || failure()
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: thiscommentistofindthisformatcomment
- name: Create or update comment
continue-on-error: true
if: failure()
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
❌ Code is not formatted! Please run `cargo format` and push the changes.
<!-- thiscommentistofindthisformatcomment -->
edit-mode: replace
- name: Create or update comment
continue-on-error: true
if: ${{ success() && steps.fc.outputs.comment-id != null }}
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
✅ Code is now correctly formatted.
<!-- thiscommentistofindthisformatcomment -->
edit-mode: replace
unused-deps:
name: No unused dependencies
runs-on: ubuntu-24.04
env:
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c # master
with:
toolchain: nightly
components: rustfmt
- name: add llvm deb repository
uses: myci-actions/add-deb-repo@43408b9f0225d1c64ba667d59e337c6140383bbe # 11
with:
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main
repo-name: llvm-repo
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- name: Install LLVM
run: sudo apt-get install llvm-19 llvm-19-dev llvm-19-runtime clang-19 clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools
- name: Machete
uses: bnjbvr/cargo-machete@4eaa2674d88afbc32a065d868d906c7492129d45 # main
test:
name: test (linux, amd64)
runs-on: ubuntu-24.04
env:
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/
RUST_LOG: cairo_native=debug,cairo_native_test=debug
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
submodules: true
- name: Install testing tools
uses: taiki-e/install-action@a6b2e2dcd845ddd7f509ce4f3ed3d922b80cc5d9 # v2
with:
tool: cargo-nextest
- name: check and free hdd space left
run: |
echo "Listing 20 largest packages"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 20
df -h
sudo apt-get update
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^temurin-.*'
sudo apt-get remove -y azure-cli microsoft-edge-stable google-chrome-stable firefox mono-devel
sudo apt-get autoremove -y
sudo apt-get clean
df -h
echo "Removing large directories"
# deleting 15GB
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/lib/android
df -h
- name: Setup rust env
uses: dtolnay/rust-toolchain@1321684edfabb845e0bc37de117ff544adf0f648 # 1.84.1
- name: Retreive cached dependecies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: add llvm deb repository
uses: myci-actions/add-deb-repo@43408b9f0225d1c64ba667d59e337c6140383bbe # 11
with:
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main
repo-name: llvm-repo
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- run: sudo apt-get update && sudo apt-get upgrade -y
- name: Install LLVM
run: sudo apt-get install llvm-19 llvm-19-dev llvm-19-runtime clang-19 clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools
- name: Install deps
run: make deps
- name: test
run: make test-ci
- name: test-cairo
run: make test-cairo
test_macos:
name: Test (macOS, Apple silicon)
runs-on: macos-14
env:
CARGO_TERM_COLOR: always
LIBRARY_PATH: /opt/homebrew/lib
MLIR_SYS_190_PREFIX: /opt/homebrew/opt/llvm@19
LLVM_SYS_191_PREFIX: /opt/homebrew/opt/llvm@19
TABLEGEN_190_PREFIX: /opt/homebrew/opt/llvm@19
RUST_LOG: cairo_native=debug,cairo_native_test=debug
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
submodules: true
- name: Install testing tools
uses: taiki-e/install-action@a6b2e2dcd845ddd7f509ce4f3ed3d922b80cc5d9 # v2
with:
tool: cargo-nextest
- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@1321684edfabb845e0bc37de117ff544adf0f648 # 1.84.1
with:
components: clippy
- name: Rust `$PATH` workaround.
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- uses: Homebrew/actions/setup-homebrew@df4b09108a1de9d6f995fe68f302b3f68bd6d2ef # master
- name: Install deps
run: make deps
- name: Run tests
run: make test-ci
- name: test-cairo
run: make test-cairo
dockerfile:
name: dockerfile (linux, amd64)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
submodules: true
- name: check and free hdd space left
run: |
echo "Listing 20 largest packages"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 20
df -h
sudo apt-get update
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^temurin-.*'
sudo apt-get remove -y azure-cli microsoft-edge-stable google-chrome-stable firefox mono-devel
sudo apt-get autoremove -y
sudo apt-get clean
df -h
echo "Removing large directories"
# deleting 15GB
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /usr/local/lib/android
df -h
- name: build image
run: docker build .
build-sierra-emu:
name: Build sierra-emu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
submodules: true
- name: Retreive cached dependecies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Install dependencies
run: |
make deps
cd ./debug_utils/sierra-emu
make corelib
- name: Build
working-directory: ./debug_utils/sierra-emu
run: cargo build --all-features --verbose
- name: Run tests
working-directory: ./debug_utils/sierra-emu
run: make test-no-corelib
- name: Run corelib's tests
working-directory: ./debug_utils/sierra-emu
run: cargo test test_corelib -- --nocapture
build-sierra2casm-dbg:
name: Build sierra2casm-dbg
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Retreive cached dependecies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- name: Build
working-directory: ./debug_utils/casm-data-flow
run: cargo build --all-features --verbose
- name: Run tests
working-directory: ./debug_utils/casm-data-flow
run: cargo test