test #124
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: Test | |
on: | |
push: | |
branches: [test/riscv32] | |
workflow_dispatch: | |
inputs: | |
publish: | |
default: false | |
description: Publish package | |
required: false | |
type: boolean | |
jobs: | |
build: | |
name: Build native libraries | |
strategy: | |
matrix: | |
include: | |
- library: libeth_pairings.so | |
os: ubuntu-22.04 | |
rid: linux-riscv32 | |
target: riscv32im-unknown-none-elf | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out eip1962 repository | |
uses: actions/checkout@v4 | |
with: | |
repository: nethermindeth/eip1962 | |
ref: test/riscv32 | |
path: eth_pairings | |
# - name: Set up GNU C compiler for arm64 | |
# run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu | |
- name: Set up Rust | |
run: | | |
curl -sL https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.11.22/riscv32-elf-ubuntu-22.04-llvm-nightly-2024.11.22-nightly.tar.xz -o riscv32.tar.xz | |
sudo mkdir -p /opt/riscv32 | |
sudo tar xf riscv32.tar.xz -C /opt/riscv32/ | |
export PATH=/opt/riscv32/riscv/bin:$PATH | |
rustup update | |
rustup override set nightly | |
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu | |
rustup target add ${{ matrix.target }} | |
- name: Build | |
working-directory: eth_pairings | |
run: cargo build -Zbuild-std="core,alloc" --release --target ${{ matrix.target }} --features eip_196_c_api,eip_2357_c_api | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.rid }} | |
path: eth_pairings/target/${{ matrix.target }}/release/${{ matrix.library }} | |
retention-days: 2 | |
if-no-files-found: error | |
# test: | |
# name: Build package | |
# needs: build | |
# env: | |
# BUILD_CONFIG: release | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Check out eth-pairings-bindings repository | |
# uses: actions/checkout@v4 | |
# - name: Download artifacts | |
# uses: actions/download-artifact@v4 | |
# with: | |
# path: src/Nethermind.Crypto.Pairings/runtimes | |
# - name: Move artifacts | |
# working-directory: src/Nethermind.Crypto.Pairings/runtimes | |
# run: | | |
# mv -f linux-arm64/libeth_pairings.so linux-arm64/native/libeth_pairings.so | |
# mv -f linux-x64/libeth_pairings.so linux-x64/native/libeth_pairings.so | |
# mv -f osx-arm64/libeth_pairings.dylib osx-arm64/native/libeth_pairings.dylib | |
# mv -f osx-x64/libeth_pairings.dylib osx-x64/native/libeth_pairings.dylib | |
# mv -f win-x64/eth_pairings.dll win-x64/native/eth_pairings.dll | |
# - name: Set up .NET | |
# uses: actions/setup-dotnet@v4 | |
# - name: Install dependencies | |
# working-directory: src | |
# run: dotnet restore | |
# - name: Build | |
# working-directory: src/Nethermind.Crypto.Pairings | |
# run: dotnet build -c ${{ env.BUILD_CONFIG }} --no-restore | |
# - name: Test | |
# working-directory: src/Nethermind.Crypto.Pairings.Tests | |
# run: dotnet test -c ${{ env.BUILD_CONFIG }} --no-restore | |
# - name: Publish | |
# if: ${{ inputs.publish }} | |
# working-directory: src/Nethermind.Crypto.Pairings | |
# run: | | |
# dotnet pack -c ${{ env.BUILD_CONFIG }} --no-build | |
# dotnet nuget push bin/${{ env.BUILD_CONFIG }}/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json |