mirror of
https://github.com/luxfi/netrunner.git
synced 2026-07-27 00:04:23 +00:00
test
This commit is contained in:
@@ -22,7 +22,7 @@ jobs:
|
||||
run: git config --global url."https://${GITHUB_ACCESS_TOKEN}@github.com/ava-labs/avalanchego-operator".insteadOf "https://github.com/ava-labs/avalanchego-operator"
|
||||
- uses: actions/checkout@v2
|
||||
#- name: golangci-lint
|
||||
# uses: golangci/golangci-lint-action@v2
|
||||
#uses: golangci/golangci-lint-action@v2
|
||||
#with:
|
||||
# version: "v1.47.0"
|
||||
# working-directory: .
|
||||
@@ -39,8 +39,7 @@ jobs:
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.18
|
||||
- run: ls
|
||||
#- run: go test -v -timeout 10m -race ./...
|
||||
#- run: go test -v -timeout 10m -race ./...
|
||||
e2e_test:
|
||||
name: e2e tests
|
||||
runs-on: ubuntu-latest
|
||||
@@ -57,28 +56,7 @@ jobs:
|
||||
shell: bash
|
||||
run: ls
|
||||
#run: scripts/tests.e2e.sh 1.8.0 1.8.1 0.3.0
|
||||
release-darwin:
|
||||
needs: [lint_test, unit_test, e2e_test]
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Git checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --rm-dist --config .goreleaser-darwin.yml --skip-publish
|
||||
env:
|
||||
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
release-linux:
|
||||
release:
|
||||
needs: [lint_test, unit_test, e2e_test]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -92,27 +70,17 @@ jobs:
|
||||
go-version: 1.18
|
||||
- name: Set up arm64 cross compiler
|
||||
run: sudo apt-get -y install gcc-aarch64-linux-gnu
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --rm-dist --config .goreleaser-linux.yml --skip-publish
|
||||
env:
|
||||
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
release:
|
||||
needs: [release-darwin, release-linux]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Git checkout
|
||||
- name: Checkout osxcross
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.18
|
||||
repository: tpoechtrager/osxcross
|
||||
path: osxcross
|
||||
- name: Build osxcross
|
||||
run: |
|
||||
cd osxcross/tarballs
|
||||
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.11.sdk.tar.xz
|
||||
cd ..
|
||||
UNATTENDED=1 ./build.sh
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# ref. https://goreleaser.com/customization/build/
|
||||
builds:
|
||||
- id: avalanche-network-runner
|
||||
main: ./main.go
|
||||
binary: avalanche-network-runner
|
||||
flags:
|
||||
- -v
|
||||
ldflags:
|
||||
- -X 'github.com/ava-labs/avalanche-network-runner/cmd.Version={{.Version}}'
|
||||
goos:
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
release:
|
||||
# Repo in which the release will be created.
|
||||
# Default is extracted from the origin remote URL or empty if its private hosted.
|
||||
github:
|
||||
owner: ava-labs
|
||||
name: avalanche-network-runner
|
||||
@@ -1,27 +0,0 @@
|
||||
# ref. https://goreleaser.com/customization/build/
|
||||
builds:
|
||||
- id: avalanche-network-runner
|
||||
main: ./main.go
|
||||
binary: avalanche-network-runner
|
||||
flags:
|
||||
- -v
|
||||
ldflags:
|
||||
- -X 'github.com/ava-labs/avalanche-network-runner/cmd.Version={{.Version}}'
|
||||
goos:
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
overrides:
|
||||
- goos: linux
|
||||
goarch: arm64
|
||||
env:
|
||||
- CC=aarch64-linux-gnu-gcc
|
||||
release:
|
||||
# Repo in which the release will be created.
|
||||
# Default is extracted from the origin remote URL or empty if its private hosted.
|
||||
github:
|
||||
owner: ava-labs
|
||||
name: avalanche-network-runner
|
||||
+31
-2
@@ -1,8 +1,37 @@
|
||||
# ref. https://goreleaser.com/customization/build/
|
||||
builds:
|
||||
- id: avalanche-network-runner
|
||||
main: ./main.go
|
||||
binary: avalanche-network-runner
|
||||
flags:
|
||||
- -v
|
||||
ldflags:
|
||||
- -X 'github.com/ava-labs/avalanche-network-runner/cmd.Version={{.Version}}'
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
overrides:
|
||||
- goos: linux
|
||||
goarch: arm64
|
||||
env:
|
||||
- CC=aarch64-linux-gnu-gcc
|
||||
- goos: darwin
|
||||
goarch: arm64
|
||||
env:
|
||||
- CC=oa64-clang
|
||||
- goos: darwin
|
||||
goarch: amd64
|
||||
goamd64: v1
|
||||
env:
|
||||
- CC=o64-clang
|
||||
release:
|
||||
# Repo in which the release will be created.
|
||||
# Default is extracted from the origin remote URL or empty if its private hosted.
|
||||
github:
|
||||
owner: ava-labs
|
||||
name: avalanche-network-runner
|
||||
extra_files:
|
||||
- glob: ./dist/avalanche-network-runner*tar.gz
|
||||
|
||||
@@ -9,18 +9,15 @@ if ! [[ "$0" =~ scripts/build.release.sh ]]; then
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if [ "${1-}" != linux ] && [ "${1-}" != darwin ]; then
|
||||
echo "arg must be linux or darwin"
|
||||
exit 255
|
||||
fi
|
||||
os=${1-}
|
||||
|
||||
# https://goreleaser.com/install/
|
||||
go install -v github.com/goreleaser/goreleaser@latest
|
||||
|
||||
# e.g.,
|
||||
# git tag 1.0.0
|
||||
#goreleaser release --config .goreleaser-$os.yml --skip-announce --skip-publish
|
||||
goreleaser release \
|
||||
--config .goreleaser.yml \
|
||||
--skip-announce \
|
||||
--skip-publish
|
||||
|
||||
# to test without git tags
|
||||
goreleaser release --config .goreleaser-$os.yml --rm-dist --skip-announce --skip-publish --snapshot
|
||||
# goreleaser release --config .goreleaser.yml --rm-dist --skip-announce --skip-publish --snapshot
|
||||
|
||||
Reference in New Issue
Block a user