Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI #12

Merged
merged 1 commit into from
May 24, 2024
Merged

CI #12

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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,29 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Install solc
run: |
mkdir -p solc
curl -sSL --output solc/solc https://github.com/ethereum/solidity/releases/download/v0.8.25/solc-static-linux
chmod +x solc/solc
echo "$(pwd)/solc/" >> $GITHUB_PATH

- name: Install LLVM
run: curl -sSL --output llvm.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.4/clang+llvm-18.1.4-x86_64-linux-gnu-ubuntu-18.04.tar.xz
- name: Extract LLVM
run: tar Jxf llvm.tar.xz
- name: Add LLVM to Path
run: echo "$(pwd)/clang+llvm-18.1.4-x86_64-linux-gnu-ubuntu-18.04/bin" >> $GITHUB_PATH
run: |
curl -sSL --output llvm.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.4/clang+llvm-18.1.4-x86_64-linux-gnu-ubuntu-18.04.tar.xz
tar Jxf llvm.tar.xz
mv clang+llvm-18.1.4-x86_64-linux-gnu-ubuntu-18.04 llvm18/
echo "$(pwd)/llvm18/bin" >> $GITHUB_PATH

- name: Install apt dependencies
run: sudo apt update && sudo apt install -y libtinfo5

- name: Format
run: make format

- name: Clippy
run: make clippy

- name: Integration
run: make test-integration
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![CI](https://github.com/xermicus/revive/actions/workflows/rust.yml/badge.svg)

# revive

YUL and EVM bytecode recompiler to LLVM, targetting RISC-V on PolkaVM.
Expand Down
5 changes: 4 additions & 1 deletion crates/builtins/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ fn main() {
.read_to_string(&mut llvm_lib_dir)
.expect("llvm-config output should be utf8");

let lib_path = std::path::PathBuf::from(llvm_lib_dir.trim())
let mut lib_path = std::path::PathBuf::from(llvm_lib_dir.trim())
.join("linux")
.join(lib);
if !lib_path.exists() {
lib_path = std::path::PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()).join(lib);
}
let archive = fs::read(lib_path).expect("clang builtins for riscv32 not found");

let out_dir = env::var_os("OUT_DIR").expect("has OUT_DIR");
Expand Down
Binary file added crates/builtins/libclang_rt.builtins-riscv32.a
Binary file not shown.