Spike/ffi #191
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
name: Build | |
on: | |
push: | |
branches: | |
- master | |
- main | |
paths: | |
- "**.rs" | |
- "**.toml" | |
- "**.lock" | |
- ".github/workflows/*.yml" | |
pull_request: | |
branches: | |
- master | |
- main | |
paths: | |
- "**.rs" | |
- "**.toml" | |
- "**.lock" | |
- ".github/workflows/*.yml" | |
env: | |
CI_TOOLCHAIN: "nightly-x86_64-unknown-linux-gnu" | |
jobs: | |
format-build-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
- name: Install ffi toolchain (1.76.0) | |
run: | | |
rustup show active-toolchain | |
rustup install 1.76.0-x86_64-unknown-linux-gnu | |
rustup component add clippy rustfmt | |
- name: install libdrift_ffi_sys | |
run: | | |
mkdir local_libs && cd local_libs | |
curl -L https://github.com/user-attachments/files/17126152/libdrift_ffi_sys.so.zip > ffi.zip | |
unzip ffi.zip | |
ldd libdrift_ffi_sys.so | |
(ldconfig -p | grep linux-vdso && echo "found") || echo "not found" | |
(ldconfig -p | grep libgcc_s && echo "found") || echo "not found" | |
(ldconfig -p | grep libm && echo "found") || echo "not found" | |
(ldconfig -p | grep libc && echo "found") || echo "not found" | |
(ldconfig -p | grep ld-linux-x86-64 && echo "found") || echo "not found" | |
- name: Format | |
run: cargo fmt --all -- --check | |
- name: Build | |
run: cargo check | |
env: | |
CARGO_DRIFT_FFI_PATH: "${{ github.workspace }}/local_libs" | |
# - name: Clippy | |
# uses: giraffate/clippy-action@v1 | |
# with: | |
# reporter: 'github-pr-review' | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# env: | |
# RUST_TOOLCHAIN: stable-x86_64-linux-unknown-gnu # force clippy to build with same rust version | |
# CARGO_DRIFT_FFI_PATH: "${{ github.workspace }}/local_libs" | |
- name: Test | |
run: | | |
echo $CARGO_DRIFT_FFI_PATH | |
ls -al $CARGO_DRIFT_FFI_PATH | |
sudo apt install -y libgcc1 | |
cargo test --no-fail-fast -- --nocapture | |
env: | |
RUST_LOG: info | |
TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} | |
CARGO_DRIFT_FFI_PATH: "${{ github.workspace }}/local_libs" |