Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix test flow to install libsodium #803

Merged
merged 9 commits into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
**/**.go
go.mod
go.sum
.github/workflows/test.yml
- name: Build
run: GOOS=linux CGO_ENABLED=1 GOARCH=${{ matrix.goarch }} CC=${{ matrix.gcc }} LEDGER_ENABLED=false make build

Expand Down Expand Up @@ -129,16 +130,23 @@ jobs:
**/**.go
go.mod
go.sum
.github/workflows/test.yml
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-${{ matrix.part }}"
if: env.GIT_DIFF
- name: install libsodium
run: |
make libsodium
if: env.GIT_DIFF
- name: test & coverage report creation
env:
USE_PRELOAD: 1,4
SAVE_BRANCH_LAUNCH_DEPTH: 1
CGO_CFLAGS: -I/home/runner/work/lbm-sdk/lbm-sdk/tools/sodium/linux_amd64/include
CGO_LDFLAGS: -L/home/runner/work/lbm-sdk/lbm-sdk/tools/sodium/linux_amd64/lib -lsodium
0Tech marked this conversation as resolved.
Show resolved Hide resolved
run: |
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='norace ledger test_ledger_mock goleveldb libsodium'
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='norace ledger test_ledger_mock goleveldb gcc libsodium'
if: env.GIT_DIFF
- uses: actions/upload-artifact@v3
with:
Expand All @@ -156,6 +164,7 @@ jobs:
**/**.go
go.mod
go.sum
.github/workflows/test.yml
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-00-coverage"
Expand Down Expand Up @@ -209,17 +218,24 @@ jobs:
**/**.go
go.mod
go.sum
.github/workflows/test.yml
- uses: actions/download-artifact@v3
with:
name: "${{ github.sha }}-${{ matrix.part }}"
if: env.GIT_DIFF
- name: install libsodium
run: |
make libsodium
if: env.GIT_DIFF
- name: test & coverage report creation
env:
USE_PREFETCH: NO
USE_PRELOAD: 1,4
SAVE_BRANCH_LAUNCH_DEPTH: 1
CGO_CFLAGS: -I${{ GITHUB_WORKSPACE }}/tools/sodium/linux_amd64/include
CGO_LDFLAGS: -L${{ GITHUB_WORKSPACE }}/tools/sodium/linux_amd64/lib -lsodium
run: |
xargs --arg-file=pkgs.txt.part.${{ matrix.part }} go test -mod=readonly -timeout 30m -race -tags='cgo ledger test_ledger_mock goleveldb libsodium'
xargs --arg-file=pkgs.txt.part.${{ matrix.part }} go test -mod=readonly -timeout 30m -race -tags='cgo ledger test_ledger_mock goleveldb gcc libsodium'
if: env.GIT_DIFF
- uses: actions/upload-artifact@v3
with:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (baseapp) [\#781](https://github.com/line/lbm-sdk/pull/781) implement method `SetOption()` in baseapp
* (global) [\#782](https://github.com/line/lbm-sdk/pull/782) add unhandled return error handling
* (x/collection,x/token) [\#798](https://github.com/line/lbm-sdk/pull/798) Fix x/collection ModifyContract
* (ci) [\#803](https://github.com/line/lbm-sdk/pull/803) fix test flow to install libsodium

### Breaking Changes
* (cli) [\#773](https://github.com/line/lbm-sdk/pull/773) guide users to use generate-only in messages for x/foundation authority
Expand Down