mirror of
https://github.com/logos-storage/logos-storage-go-bindings.git
synced 2026-01-03 22:13:06 +00:00
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: Go Tests
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Install Rust 1.85.0
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: 1.85.0
|
|
|
|
- name: Record submodule commit
|
|
run: git -C vendor/logos-storage-nim rev-parse HEAD > vendor/logos-storage-nim/.storage-commit
|
|
|
|
- name: Cache libstorage build
|
|
id: cache-libstorage
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: vendor/logos-storage-nim/build
|
|
key: ${{ runner.os }}-libstorage-${{ hashFiles('vendor/logos-storage-nim/.storage-commit') }}
|
|
|
|
- name: Build libstorage
|
|
if: steps.cache-libstorage.outputs.cache-hit != 'true'
|
|
run: |
|
|
make update
|
|
STORAGE_LIB_PARAMS="-d:storage_enable_api_debug_peers=true -d:LeopardCmakeFlags=\"-DCMAKE_POSITION_INDEPENDENT_CODE=ON\"" make libstorage
|
|
|
|
- name: Build Logos Storage go
|
|
run: make
|
|
|
|
- name: Install gotestsum
|
|
run: go install gotest.tools/gotestsum@latest
|
|
|
|
- name: Go test
|
|
run: make test
|