Skip to content

Commit

Permalink
Merge branch 'main' into feat/compile-contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
edg-l authored Oct 18, 2024
2 parents 495cce2 + 0e251c5 commit 1e3a70e
Show file tree
Hide file tree
Showing 81 changed files with 4,787 additions and 3,307 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/bench-hyperfine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
jobs:
bench-hyperfine:
name: Hyperfine
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/
Expand All @@ -34,7 +34,7 @@ jobs:
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 google-cloud-cli microsoft-edge-stable google-chrome-stable firefox powershell mono-devel
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
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
matrix:
branch: [ base, head ]
name: Build cairo-native-run for ${{ matrix.branch }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Cache binary
uses: actions/cache@v3
Expand All @@ -124,7 +124,7 @@ jobs:
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 google-cloud-cli microsoft-edge-stable google-chrome-stable firefox powershell mono-devel
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
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
hyperfine-prs:
name: Bench PR (linux, amd64)
needs: [ build-binaries ]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
PROGRAM: fib_2M
OUTPUT_DIR: bench-outputs
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
- name: Print tables
run: |
{
echo "Benchmark results Main vs HEAD"
echo "${bold}Benchmark results Main vs HEAD.${normal}"
for f in $OUTPUT_DIR/*.md; do
echo
cat $f
Expand All @@ -242,7 +242,7 @@ jobs:
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: Benchmarking
body-includes: Benchmark results Main vs HEAD

- name: Create or update bench comment
continue-on-error: true
Expand Down
45 changes: 17 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
jobs:
check:
name: clippy
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/
Expand All @@ -38,7 +38,7 @@ jobs:

fmt:
name: rustfmt
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
Expand Down Expand Up @@ -81,12 +81,11 @@ jobs:

# Check for unnecessary dependencies.
udeps:
runs-on: ubuntu-latest
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/
RUSTUP_TOOLCHAIN: nightly # udeps needs nightly
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
Expand All @@ -102,14 +101,12 @@ jobs:
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: "Download and run cargo-udeps"
run: |
wget -O - -c https://github.com/est31/cargo-udeps/releases/download/v0.1.50/cargo-udeps-v0.1.50-x86_64-unknown-linux-gnu.tar.gz | tar -xz
cargo-udeps-*/cargo-udeps udeps --all-targets --all-features
- name: Machete
uses: bnjbvr/cargo-machete@main

test:
name: test (linux, amd64)
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/
Expand All @@ -127,7 +124,7 @@ jobs:
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 google-cloud-cli microsoft-edge-stable google-chrome-stable firefox powershell mono-devel
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
Expand All @@ -151,8 +148,6 @@ jobs:
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: Build cairo-native-runtime library.
run: cargo build --profile=ci --package=cairo-native-runtime
- name: test
run: make test-ci
- name: test-cairo
Expand Down Expand Up @@ -180,19 +175,17 @@ jobs:
- name: Install scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.8.2"
scarb-version: "2.8.4"
- name: Install deps
run: make deps
- name: Build cairo-native-runtime library.
run: cargo build --profile=ci --package=cairo-native-runtime
- name: Run tests
run: make test-ci
- name: test-cairo
run: make test-cairo

coverage:
name: coverage
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
matrix:
partition: [1, 2, 3, 4]
Expand All @@ -206,7 +199,6 @@ jobs:
- partition: 4
output: lcov-4.info
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/
Expand All @@ -223,7 +215,7 @@ jobs:
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 google-cloud-cli microsoft-edge-stable google-chrome-stable firefox powershell mono-devel
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
Expand Down Expand Up @@ -251,20 +243,18 @@ jobs:
- name: Install scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.8.2"
scarb-version: "2.8.4"
- name: Install deps
run: make deps
- name: Build runtime and alexandria
run: make runtime && make check-llvm && make needs-cairo2 && make build-alexandria
- name: Build cairo-native-runtime library.
run: export PATH=$HOME/.rustup/toolchains/stable-aarch64-apple-darwin/bin:$PATH && cargo build --profile=ci --package=cairo-native-runtime
run: make runtime-ci && make check-llvm && make needs-cairo2 && make build-alexandria

- name: Run tests and generate coverage partition ${{ matrix.partition }}
run: cargo llvm-cov nextest --verbose --all-features --workspace --lcov --output-path ${{ matrix.output }} --partition count:${{ matrix.partition }}/4
run: cargo llvm-cov nextest --verbose --features=scarb --workspace --lcov --output-path ${{ matrix.output }} --partition count:${{ matrix.partition }}/4

- name: test and generate coverage corelib
if: ${{ matrix.partition == '1' }}
run: cargo llvm-cov nextest --verbose --all-features --lcov --output-path lcov-test.info run --bin cairo-native-test -- corelib
run: cargo llvm-cov nextest --verbose --features=scarb --lcov --output-path lcov-test.info run --bin cairo-native-test -- corelib

- name: save coverage data with corelib
if: ${{ matrix.partition == '1' }}
Expand All @@ -282,10 +272,9 @@ jobs:
name: coverage-data-${{ matrix.partition }}
path: ./${{ matrix.output }}


upload-coverage:
name: Upload Coverage
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: [coverage]
steps:
- name: Setup rust env
Expand Down Expand Up @@ -328,7 +317,7 @@ jobs:

dockerfile:
name: dockerfile (linux, amd64)
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: check and free hdd space left
Expand All @@ -341,7 +330,7 @@ jobs:
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 google-cloud-cli microsoft-edge-stable google-chrome-stable firefox powershell mono-devel
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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ on:

jobs:
release:
runs-on: ubuntu-latest
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/
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: free HDD space
run: |
# deleting space
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ on:

jobs:
release:
runs-on: ubuntu-latest
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:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: free HDD space
run: |
# deleting space
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rustdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
jobs:
publish-docs:
name: GitHub Pages
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/
Expand Down
Loading

0 comments on commit 1e3a70e

Please sign in to comment.