Skip to content

Bump github.com/ethereum/go-ethereum from 1.13.4 to 1.13.15 in /go #99

Bump github.com/ethereum/go-ethereum from 1.13.4 to 1.13.15 in /go

Bump github.com/ethereum/go-ethereum from 1.13.4 to 1.13.15 in /go #99

Workflow file for this run

name: Pytest
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- goos: darwin
goarch: amd64
ext: '.dylib'
os: macos-latest
- goos: linux
goarch: amd64
ext: '.so'
CC: gcc
CXX: g++
os: ubuntu-20.04
- goos: darwin
goarch: arm64
ext: '.dylib'
os: macos-latest
- goos: windows
goarch: amd64
ext: '.dll'
os: windows-latest
- goos: linux
goarch: arm64
ext: '.so'
CC: aarch64-linux-gnu-gcc
CXX: aarch64-linux-gnu-g++
os: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Setup msbuild
if: matrix.goos == 'windows'
uses: microsoft/setup-msbuild@v1.1
- name: Install aarch64-linux-gnu-gcc (for linux/arm64 builds only)
if: matrix.goos == 'linux' && matrix.goarch == 'arm64'
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Build Library
run: |
export GOOS=${{ matrix.goos }}
export GOARCH=${{ matrix.goarch }}
export CC=${{ matrix.CC }}
export CXX=${{ matrix.CXX }}
export CGO_ENABLED=1
export PATH="$(pwd)/osxcross/target/bin:$PATH"
cd go
go mod tidy
go build -o sapphirewrapper-${{ matrix.goarch }}${{ matrix.ext }} -buildmode=c-shared
shell: bash
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: sapphirewrapper-${{ matrix.goos }}-${{ matrix.goarch }}
path: ./go/sapphirewrapper-${{ matrix.goarch }}${{ matrix.ext }}
test:
name: Pytest
runs-on: ubuntu-20.04
needs: build
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
arch: [amd64, arm64]
python-version: [3.11]
include:
- os: windows-latest
arch: amd64
python-version: 3.11
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Download built library - Linux
uses: actions/download-artifact@v2
with:
name: sapphirewrapper-linux-amd64
path: ./bin/
- name: Download built library - Darwin amd64
uses: actions/download-artifact@v2
with:
name: sapphirewrapper-darwin-amd64
path: ./bin/
- name: Download built library - Darwin arm64
uses: actions/download-artifact@v2
with:
name: sapphirewrapper-darwin-arm64
path: ./bin/
- name: Download built library - Linux arm64
uses: actions/download-artifact@v2
with:
name: sapphirewrapper-linux-arm64
path: ./bin/
- name: Download built library - Windows amd64
uses: actions/download-artifact@v2
with:
name: sapphirewrapper-windows-amd64
path: ./bin/
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install web3
pip install .
- name: Wait for 30 seconds
run: sleep 30
if: matrix.os == 'macos-latest'
- name: Wait for 30 seconds
run: sleep 30
if: matrix.arch == 'arm64'
- name: Wait for 60 seconds
run: sleep 60
if: matrix.arch == 'arm64' && matrix.os == 'macos-latest'
- name: Run tests
env:
TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }}
run: |
pytest