Skip to content

Commit

Permalink
Merge branch 'spectre-project:main' into rocksdb2
Browse files Browse the repository at this point in the history
  • Loading branch information
x100111010 authored Oct 25, 2024
2 parents 45e1c30 + c7ca43a commit ba0de51
Show file tree
Hide file tree
Showing 467 changed files with 22,128 additions and 6,289 deletions.
38 changes: 26 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ jobs:

test:
name: Test Suite
# runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
# matrix:
# os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:

# Clean unnecessary files to save disk space
- name: clean unnecessary files to save space
run: |
Expand Down Expand Up @@ -68,6 +66,7 @@ jobs:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:

# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
tool-cache: false

Expand Down Expand Up @@ -125,6 +124,9 @@ jobs:
- name: Run cargo doc tests with features=no-asm on spectre-hashes
run: cargo test --doc --release -p spectre-hashes --features=no-asm

- name: Run cargo doc
run: cargo doc --release --no-deps --workspace

lints:
name: Lints
runs-on: ubuntu-latest
Expand Down Expand Up @@ -160,7 +162,7 @@ jobs:
run: cargo clippy --workspace --tests --benches -- -D warnings

check-wasm32:
name: Check Wasm32
name: Check WASM32
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand Down Expand Up @@ -188,6 +190,7 @@ jobs:
sudo update-alternatives --install /usr/bin/c++ c++ /usr/lib/llvm-15/bin/clang++ 0
- name: Install gcc-multilib

# gcc-multilib allows clang to find gnu libraries properly
run: |
sudo apt-get update
Expand Down Expand Up @@ -231,12 +234,16 @@ jobs:
run: cargo clippy -p spectre-wasm --target wasm32-unknown-unknown

build-wasm32:
name: Build Wasm32
name: Build WASM32 SDK
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup Environment
shell: bash
run: echo "SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV

- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
Expand All @@ -259,6 +266,7 @@ jobs:
sudo update-alternatives --install /usr/bin/c++ c++ /usr/lib/llvm-15/bin/clang++ 0
- name: Install gcc-multilib

# gcc-multilib allows clang to find gnu libraries properly
run: |
sudo apt-get update
Expand Down Expand Up @@ -293,20 +301,25 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build wasm release
- name: Build WASM release
env:
TARGET_CC: clang
TARGET_CFLAGS: -I/usr/include
run: cd wasm && bash build-release
run: |
pushd .
cd wasm
bash build-release
popd
mv wasm/release/spectre-wasm32-sdk.zip wasm/release/spectre-wasm32-sdk-${{ env.SHORT_SHA }}.zip
- name: Upload wasm binary to GitHub
- name: Upload WASM build to GitHub
uses: actions/upload-artifact@v4
with:
name: spectre-wasm32-sdk
path: wasm/release/spectre-wasm32-sdk.zip
name: spectre-wasm32-sdk-${{ env.SHORT_SHA }}.zip
path: wasm/release/spectre-wasm32-sdk-${{ env.SHORT_SHA }}.zip

build-release:
name: Build Ubuntu Release
name: Build Linux Release
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand Down Expand Up @@ -337,7 +350,8 @@ jobs:

- name: Build on Linux
if: runner.os == 'Linux'

# We're using musl to make the binaries statically linked and portable
run: |
cargo install cargo-zigbuild
cargo --verbose zigbuild --bin spectred --bin simpa --bin rothschild --release --target x86_64-unknown-linux-gnu.2.27 # Use an older glibc version
cargo --verbose zigbuild --bin spectred --bin simpa --bin rothschild --release --target x86_64-unknown-linux-gnu.2.27 # Use an older glibc version
Loading

0 comments on commit ba0de51

Please sign in to comment.