forked from ava-labs/hypersdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add rust-ci local github-action * Abstract install-go action * Centralize Go install parameters * Consolidate CI * Comment out code coverage * Finish centralizing the Go installation for CI * Handle releases * Fix passing secret to release-actions * [ci] Small Tweaks (ava-labs#875) * nits * remove labels --------- Co-authored-by: Patrick O'Grady <prohb125@gmail.com>
- Loading branch information
Showing
22 changed files
with
519 additions
and
698 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'Install Go toolchain with defaults' | ||
description: 'Install a go toolchain with defaults' | ||
|
||
inputs: | ||
cache: | ||
description: "to cache or not to cache, that is the question" | ||
required: false | ||
default: "true" | ||
cache-dependency-path: | ||
description: "forwards go actions/setup-go" | ||
required: false | ||
|
||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.21' | ||
check-latest: true | ||
cache: ${{ inputs.cache }} | ||
cache-dependency-path: ${{ inputs.cache-dependency-path }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: 'Install Rust toolchain and Cache' | ||
description: 'Install a rust toolchain and cache' | ||
|
||
inputs: | ||
targets: | ||
description: 'pass targets to the rust-toolchain installer' | ||
required: false | ||
cache: | ||
description: "to cache or not to cache, that is the question" | ||
required: false | ||
default: "true" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: ${{ inputs.targets }} | ||
- if: ${{ inputs.cache == 'true' }} | ||
uses: Swatinem/rust-cache@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'Release Token Wallet' | ||
description: 'Release the Token Wallet' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up Go | ||
uses: ./.github/actions/install-go | ||
with: | ||
cache-dependency-path: | | ||
go.sum | ||
examples/tokenvm/go.sum | ||
- name: Build wallet | ||
working-directory: ./examples/tokenvm/cmd/token-wallet | ||
shell: bash | ||
run: scripts/build.sh | ||
env: | ||
PUBLISH: "false" | ||
- name: Archive Builds | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: token-wallet | ||
path: ./examples/tokenvm/cmd/token-wallet/token-wallet.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: 'Release VM' | ||
description: 'Release the VM' | ||
|
||
inputs: | ||
vm-name: | ||
description: 'VM name' | ||
required: true | ||
github-token: | ||
description: 'GitHub Token' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up Go | ||
uses: ./.github/actions/install-go | ||
with: | ||
cache-dependency-path: | | ||
go.sum | ||
examples/${{ inputs.vm-name }}/go.sum | ||
- name: Set up arm64 cross compiler | ||
shell: bash | ||
run: | | ||
sudo apt-get -y update | ||
sudo apt-get -y install gcc-aarch64-linux-gnu | ||
- name: Checkout osxcross | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: tpoechtrager/osxcross | ||
path: osxcross | ||
- name: Build osxcross | ||
shell: bash | ||
run: | | ||
sudo apt-get -y install clang llvm-dev libxml2-dev uuid-dev libssl-dev bash patch make tar xz-utils bzip2 gzip sed cpio libbz2-dev | ||
cd osxcross | ||
wget https://github.com/joseluisq/macosx-sdks/releases/download/12.3/$MACOS_SDK_FNAME -O tarballs/$MACOS_SDK_FNAME | ||
echo $MACOS_SDK_CHECKSUM tarballs/$MACOS_SDK_FNAME | sha256sum -c - | ||
UNATTENDED=1 ./build.sh | ||
echo $PWD/target/bin >> $GITHUB_PATH | ||
env: | ||
MACOS_SDK_FNAME: MacOSX12.3.sdk.tar.xz | ||
MACOS_SDK_CHECKSUM: 3abd261ceb483c44295a6623fdffe5d44fc4ac2c872526576ec5ab5ad0f6e26c | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release | ||
workdir: ./examples/${{ inputs.vm-name }}/ | ||
env: | ||
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret | ||
GITHUB_TOKEN: ${{ inputs.github-token }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.