mirror of
https://github.com/logos-storage/logos-storage-go-bindings.git
synced 2026-01-02 13:33:10 +00:00
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: Go Tests
|
|
|
|
on:
|
|
push:
|
|
branches: master
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-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/nim-codex rev-parse HEAD > vendor/nim-codex/.codex-commit
|
|
|
|
- name: Cache libcodex build
|
|
id: cache-libcodex
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: vendor/nim-codex/build
|
|
key: ${{ runner.os }}-libcodex-${{ hashFiles('vendor/nim-codex/.codex-commit') }}
|
|
|
|
- name: Build libcodex
|
|
if: steps.cache-libcodex.outputs.cache-hit != 'true'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential
|
|
make update
|
|
CODEX_LIB_PARAMS="-d:codex_enable_api_debug_peers=true -d:LeopardCmakeFlags=\"-DCMAKE_POSITION_INDEPENDENT_CODE=ON\"" make libcodex
|
|
|
|
- name: Build codex go
|
|
run: make
|
|
|
|
- name: Go test
|
|
env:
|
|
CGO_ENABLED: 1
|
|
run: make test
|