-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update LLVM 19. * update ffi.cpp * remove unused ffi functions * Make dependencies non-path-relative. * change ci * use lambda repos2 * update all ci * use oficial deps * upd readme * update dockerfile * update bench script * relax libc version * relax libc version * remove ffi cpp code no longer needed * remove ffi * upd env.sh --------- Co-authored-by: Edgar <[email protected]>
- Loading branch information
1 parent
0e96dff
commit 6fb1fec
Showing
18 changed files
with
244 additions
and
698 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | ||
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | ||
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | ||
LLVM_SYS_181_PREFIX: /usr/lib/llvm-18/ | ||
MLIR_SYS_190_PREFIX: /usr/lib/llvm-19/ | ||
TABLEGEN_190_PREFIX: /usr/lib/llvm-19/ | ||
LLVM_SYS_191_PREFIX: /usr/lib/llvm-19/ | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: check and free hdd space left | ||
|
@@ -50,11 +50,11 @@ jobs: | |
- name: add llvm deb repository | ||
uses: myci-actions/add-deb-repo@11 | ||
with: | ||
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main | ||
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-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools | ||
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 hyperfine | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
|
@@ -86,12 +86,12 @@ jobs: | |
issue-number: ${{ github.event.pull_request.number }} | ||
body-path: bench-hyperfine.md | ||
edit-mode: replace | ||
|
||
build-binaries: | ||
env: | ||
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | ||
LLVM_SYS_181_PREFIX: /usr/lib/llvm-18/ | ||
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | ||
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 | ||
strategy: | ||
matrix: | ||
|
@@ -101,18 +101,18 @@ jobs: | |
steps: | ||
- name: Cache binary | ||
uses: actions/cache@v3 | ||
id: cache-binary | ||
id: cache-binary | ||
with: | ||
path: bin/cairo-native-run-${{ matrix.branch }} | ||
key: binary-${{ github.event.pull_request[matrix.branch].sha }} | ||
|
||
- name: Cache runtime-library | ||
uses: actions/cache@v3 | ||
id: cache-library | ||
id: cache-library | ||
with: | ||
path: lib/libcairo-native-runtime-${{ matrix.branch }}.a | ||
key: library-${{ github.event.pull_request[matrix.branch].sha }} | ||
key: library-${{ github.event.pull_request[matrix.branch].sha }} | ||
|
||
- name: check and free hdd space left | ||
if: ${{ steps.cache-binary.outputs.cache-hit != 'true' }} | ||
run: | | ||
|
@@ -137,37 +137,37 @@ jobs: | |
- name: Install Rust | ||
if: ${{ steps.cache-binary.outputs.cache-hit != 'true' || steps.cache-library.outputs.cache-hit != 'true' }} | ||
uses: dtolnay/[email protected] | ||
|
||
- name: add llvm deb repository | ||
if: ${{ steps.cache-binary.outputs.cache-hit != 'true' || steps.cache-library.outputs.cache-hit != 'true' }} | ||
uses: myci-actions/add-deb-repo@11 | ||
with: | ||
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main | ||
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 | ||
if: ${{ steps.cache-binary.outputs.cache-hit != 'true' || steps.cache-library.outputs.cache-hit != 'true' }} | ||
run: sudo apt-get update && sudo apt-get install llvm-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools | ||
run: sudo apt-get update && 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: Checkout base commit | ||
if: ${{ steps.cache-binary.outputs.cache-hit != 'true' || steps.cache-library.outputs.cache-hit != 'true' }} | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request[matrix.branch].sha }} | ||
|
||
- name: Fetch Rust cache | ||
if: ${{ steps.cache-binary.outputs.cache-hit != 'true' || steps.cache-library.outputs.cache-hit != 'true' }} | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Build binary | ||
if: ${{ steps.cache-binary.outputs.cache-hit != 'true' || steps.cache-library.outputs.cache-hit != 'true' }} | ||
run: | | ||
make build | ||
mkdir lib bin | ||
cp target/release/cairo-native-run bin/cairo-native-run-${{ matrix.branch }} | ||
cp target/release/libcairo_native_runtime.a lib/libcairo-native-runtime-${{ matrix.branch }}.a | ||
hyperfine-prs: | ||
name: Bench PR (linux, amd64) | ||
needs: [ build-binaries ] | ||
|
@@ -219,10 +219,10 @@ jobs: | |
--export-markdown "${f%.*}.md" \ | ||
--export-json "${f%.*}.json" \ | ||
--warmup 3 \ | ||
-n "head $(basename $f) (JIT)" "./bin/cairo-native-run-head --run-mode=jit -s $f --opt-level 3 --available-gas 18446744073709551615" \ | ||
-n "base $(basename $f) (JIT)" "./bin/cairo-native-run-base --run-mode=jit -s $f --opt-level 3 --available-gas 18446744073709551615" \ | ||
-n "head $(basename $f) (AOT)" "CAIRO_NATIVE_RUNTIME_LIBRARY=lib/libcairo-native-runtime-head.a ./bin/cairo-native-run-head --run-mode=aot -s $f --opt-level 3 --available-gas 18446744073709551615" \ | ||
-n "base $(basename $f) (AOT)" "CAIRO_NATIVE_RUNTIME_LIBRARY=lib/libcairo-native-runtime-base.a ./bin/cairo-native-run-base --run-mode=aot -s $f --opt-level 3 --available-gas 18446744073709551615" \ | ||
-n "head $(basename $f) (JIT)" "./bin/cairo-native-run-head --run-mode=jit -s $f --opt-level 3 --available-gas 19446744073709551615" \ | ||
-n "base $(basename $f) (JIT)" "./bin/cairo-native-run-base --run-mode=jit -s $f --opt-level 3 --available-gas 19446744073709551615" \ | ||
-n "head $(basename $f) (AOT)" "CAIRO_NATIVE_RUNTIME_LIBRARY=lib/libcairo-native-runtime-head.a ./bin/cairo-native-run-head --run-mode=aot -s $f --opt-level 3 --available-gas 19446744073709551615" \ | ||
-n "base $(basename $f) (AOT)" "CAIRO_NATIVE_RUNTIME_LIBRARY=lib/libcairo-native-runtime-base.a ./bin/cairo-native-run-base --run-mode=aot -s $f --opt-level 3 --available-gas 19446744073709551615" \ | ||
>> /dev/stderr | ||
done | ||
- name: Print tables | ||
|
@@ -243,7 +243,7 @@ jobs: | |
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: "github-actions[bot]" | ||
body-includes: Benchmarking | ||
|
||
- name: Create or update bench comment | ||
continue-on-error: true | ||
uses: peter-evans/create-or-update-comment@v4 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,9 @@ jobs: | |
name: clippy | ||
runs-on: ubuntu-latest | ||
env: | ||
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | ||
LLVM_SYS_181_PREFIX: /usr/lib/llvm-18/ | ||
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | ||
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@v4 | ||
- uses: dtolnay/[email protected] | ||
|
@@ -28,11 +28,11 @@ jobs: | |
- name: add llvm deb repository | ||
uses: myci-actions/add-deb-repo@11 | ||
with: | ||
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main | ||
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-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools | ||
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: Clippy | ||
run: make check | ||
|
||
|
@@ -83,9 +83,9 @@ jobs: | |
udeps: | ||
runs-on: ubuntu-latest | ||
env: | ||
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | ||
LLVM_SYS_181_PREFIX: /usr/lib/llvm-18/ | ||
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | ||
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 | ||
|
@@ -97,11 +97,11 @@ jobs: | |
- name: add llvm deb repository | ||
uses: myci-actions/add-deb-repo@11 | ||
with: | ||
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main | ||
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-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools | ||
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 | ||
|
@@ -111,9 +111,9 @@ jobs: | |
name: test (linux, amd64) | ||
runs-on: ubuntu-latest | ||
env: | ||
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | ||
LLVM_SYS_181_PREFIX: /usr/lib/llvm-18/ | ||
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | ||
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@v4 | ||
|
@@ -143,12 +143,12 @@ jobs: | |
- name: add llvm deb repository | ||
uses: myci-actions/add-deb-repo@11 | ||
with: | ||
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main | ||
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-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools | ||
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. | ||
|
@@ -164,9 +164,9 @@ jobs: | |
env: | ||
CARGO_TERM_COLOR: always | ||
LIBRARY_PATH: /opt/homebrew/lib | ||
MLIR_SYS_180_PREFIX: /opt/homebrew/opt/llvm@18 | ||
LLVM_SYS_181_PREFIX: /opt/homebrew/opt/llvm@18 | ||
TABLEGEN_180_PREFIX: /opt/homebrew/opt/llvm@18 | ||
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@v4 | ||
|
@@ -207,9 +207,9 @@ jobs: | |
output: lcov-4.info | ||
env: | ||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | ||
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | ||
LLVM_SYS_181_PREFIX: /usr/lib/llvm-18/ | ||
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | ||
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 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -239,11 +239,11 @@ jobs: | |
- name: add llvm deb repository | ||
uses: myci-actions/add-deb-repo@11 | ||
with: | ||
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main | ||
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-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools | ||
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 testing tools | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,21 +13,21 @@ jobs: | |
name: GitHub Pages | ||
runs-on: ubuntu-latest | ||
env: | ||
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/ | ||
LLVM_SYS_181_PREFIX: /usr/lib/llvm-18/ | ||
TABLEGEN_180_PREFIX: /usr/lib/llvm-18/ | ||
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@v4 | ||
- uses: dtolnay/[email protected] | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: add llvm deb repository | ||
uses: myci-actions/add-deb-repo@11 | ||
with: | ||
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main | ||
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-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools | ||
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: Build docs | ||
run: make doc | ||
- name: Deploy Documentation | ||
|
Oops, something went wrong.