-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(rs): automate Rust releases (#632)
- Loading branch information
1 parent
f9cc87d
commit 4b80fc1
Showing
9 changed files
with
441 additions
and
156 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,22 @@ | ||
name: Free Disk Space | ||
description: Preconfigured action to free up disk space on GitHub Actions runners | ||
# Inputs might be added in the future, but for now, the defaults should be sufficient | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Free Disk Space | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: false | ||
# all of these default to true, but feel free to set to | ||
# "false" if necessary for your workflow | ||
android: true | ||
dotnet: false | ||
haskell: true | ||
large-packages: false | ||
docker-images: true | ||
swap-storage: true |
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,18 @@ | ||
name: Install WASM Utils from Binaryen | ||
description: Install wasm-opt and other utilities from Binaryen | ||
inputs: | ||
binaryen_version: | ||
description: "Binaryen Version" | ||
required: false | ||
default: "111" | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Install wasm-opt | ||
shell: bash | ||
run: | | ||
BINARYEN_VERSION=version_${{ inputs.binaryen_version }} | ||
sudo wget -c https://github.com/WebAssembly/binaryen/releases/download/$BINARYEN_VERSION/binaryen-$BINARYEN_VERSION-x86_64-linux.tar.gz -O - | sudo tar -xz -C . | ||
sudo cp binaryen-$BINARYEN_VERSION/bin/wasm-opt /usr/bin/ |
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
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,64 @@ | ||
name: '[rs] CI (Rust)' | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
paths: | ||
- '.cargo/**' | ||
- '.github/workflows/rs-*.yml' # No biggie to trigger this on changes in rs-release.yml | ||
- 'examples/**' | ||
- 'rs/**' | ||
- 'templates/**' | ||
- 'Cargo.lock' | ||
- 'Cargo.toml' | ||
- 'rust-toolchain.toml' | ||
pull_request: | ||
paths: | ||
- '.cargo/**' | ||
- '.github/workflows/rs-*.yml' # No biggie to trigger this on changes in rs-release.yml | ||
- 'examples/**' | ||
- 'rs/**' | ||
- 'templates/**' | ||
- 'Cargo.lock' | ||
- 'Cargo.toml' | ||
- 'rust-toolchain.toml' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check: | ||
name: Check Code | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Free Disk Space | ||
uses: ./.github/actions/free-disk-space | ||
|
||
- name: Install wasm-opt | ||
uses: ./.github/actions/install-wasm-utils | ||
|
||
- name: Check Code Formatting | ||
run: | | ||
__GEAR_WASM_BUILDER_NO_FEATURES_TRACKING=1 cargo fmt --all --check | ||
- name: Check Code With Clippy | ||
run: | | ||
__GEAR_WASM_BUILDER_NO_FEATURES_TRACKING=1 cargo clippy --workspace --all-targets --locked -- -D warnings | ||
- name: Check IDL Parser For WASM With Clippy | ||
run: | | ||
__GEAR_WASM_BUILDER_NO_FEATURES_TRACKING=1 cargo clippy -p sails-idl-parser --all-targets --locked --target=wasm32-unknown-unknown -- -D warnings | ||
test: | ||
name: Run Workflow Tests | ||
uses: ./.github/workflows/rs-run-ws-tests.yml | ||
with: | ||
gear_node_version: 1.6.0 | ||
|
||
test-cli: | ||
name: Run CLI Tests | ||
uses: ./.github/workflows/rs-run-cli-tests.yml |
Oops, something went wrong.