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

build(rs): automate Rust releases #632

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e293ca4
build(rs): automate Rust releases
DennisInSky Nov 5, 2024
7ac2958
add more jobs
DennisInSky Nov 5, 2024
8262b0d
run ws tests
DennisInSky Nov 5, 2024
9bba1dc
cli tests
DennisInSky Nov 5, 2024
0639be5
fix templates branch
DennisInSky Nov 5, 2024
65792b0
re-use test workflows in ci
DennisInSky Nov 5, 2024
e648f5a
add release job
DennisInSky Nov 5, 2024
4a6afeb
adjust sales_crates
DennisInSky Nov 5, 2024
40bd94f
adjust cargo.toml deps
DennisInSky Nov 5, 2024
0657f86
add job for building assets
DennisInSky Nov 5, 2024
f718f31
fix
DennisInSky Nov 5, 2024
4d9abfe
upload/download assets
DennisInSky Nov 5, 2024
5738ba5
check assets
DennisInSky Nov 5, 2024
510d571
add release creation
DennisInSky Nov 6, 2024
91d7d9a
add release target
DennisInSky Nov 6, 2024
7ff01b1
create tag before release
DennisInSky Nov 6, 2024
d9768f9
further adjustments
DennisInSky Nov 6, 2024
2294f5e
make publish a separate job
DennisInSky Nov 6, 2024
2a81e5b
add step for updating contract template
DennisInSky Nov 6, 2024
aaaff3c
.
DennisInSky Nov 6, 2024
2fd4814
add sync pr
DennisInSky Nov 6, 2024
dfd25f2
fix pr creation
DennisInSky Nov 6, 2024
726c46f
pr
DennisInSky Nov 6, 2024
90477e8
one more time
DennisInSky Nov 6, 2024
7210438
pr via cli
DennisInSky Nov 6, 2024
bfd6a26
add rights for pr
DennisInSky Nov 6, 2024
d398710
.
DennisInSky Nov 6, 2024
37a74b7
further improvements
DennisInSky Nov 6, 2024
ea23696
almost there
DennisInSky Nov 6, 2024
21a9b4f
enable tests
DennisInSky Nov 6, 2024
0875b74
finally do the real crates publish
DennisInSky Nov 7, 2024
61d2fe1
Add workflow description
DennisInSky Nov 7, 2024
dfcd9db
trigger on changes in all rs-*.yml except for rs-release.yml
DennisInSky Nov 7, 2024
39c5508
use preconfigured free-disk-space action in ci wf
DennisInSky Nov 7, 2024
1742164
fix ci wf
DennisInSky Nov 7, 2024
6fedab9
.
DennisInSky Nov 7, 2024
540f52f
.
DennisInSky Nov 7, 2024
b49acbd
use preconfigured free-disk-space
DennisInSky Nov 7, 2024
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
18 changes: 18 additions & 0 deletions .github/actions/install-wasm-utils/action.yml
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/
154 changes: 0 additions & 154 deletions .github/workflows/ci.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI (.Net)
name: '[net] CI (.Net)'

on:
push:
Expand All @@ -17,6 +17,7 @@ on:

jobs:
check:
name: Check Code
runs-on: ubuntu-latest
defaults:
run:
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/rs-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: '[rs] CI (Rust)'

on:
push:
branches: [master]
paths:
- '.cargo/**'
- '.github/workflows/ci.yml'
DennisInSky marked this conversation as resolved.
Show resolved Hide resolved
- 'examples/**'
- 'rs/**'
- 'templates/**'
- 'Cargo.lock'
- 'Cargo.toml'
- 'rust-toolchain.toml'
pull_request:
paths:
- '.cargo/**'
- '.github/workflows/ci.yml'
DennisInSky marked this conversation as resolved.
Show resolved Hide resolved
- 'examples/**'
- 'rs/**'
- 'templates/**'
- 'Cargo.lock'
- 'Cargo.toml'
- 'rust-toolchain.toml'

env:
BINARYEN_VERSION: version_111
CARGO_TERM_COLOR: always

jobs:
check:
name: Check Code
runs-on: ubuntu-latest

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

- name: Checkout Code
uses: actions/checkout@v4

- name: Install wasm-opt
run: |
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/

- 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
Loading