Bump version v0.1.6 #677
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
name: GGX-Substrate-Node | |
# The ref given is fully-formed, meaning that for branches the format is refs/heads/<branch_name>, for pull requests it is refs/pull/<pr_number>/merge, and for tags it is refs/tags/<tag_name> | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [main] | |
env: | |
NIX_VERSION: nix-2.13.2 | |
NIXPKGS_CHANNEL: nixos-22.11 | |
CACHIX_NAME: golden-gate-ggx | |
OCTOLYTICS_DIMENSION_REPOSITORY_ID: 590614152 | |
GIT_LFS_SKIP_SMUDGE: 1 | |
jobs: | |
common: | |
if: github.event_name == 'pull_request' | |
runs-on: buildjet-32vcpu-ubuntu-2204 | |
container: ggxdocker/ggxnode-dev:v1 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
persist-credentials: false | |
- run: git config --global --add safe.directory "*" | |
- uses: technote-space/[email protected] | |
id: git-diff | |
with: | |
PATTERNS: | | |
**/**.rs | |
Cargo.lock | |
- uses: dsherret/rust-toolchain-file@v1 | |
if: steps.git-diff.outputs.diff | |
- uses: buildjet/cache@v4 | |
if: steps.git-diff.outputs.diff | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: fmt | |
run: cargo fmt --all -- --check | |
if: steps.git-diff.outputs.diff | |
- name: clippy + build | |
if: steps.git-diff.outputs.diff | |
run: | | |
packages="runtime-common ggxchain-runtime-brooklyn ggxchain-runtime-sydney" | |
for pkg in $packages; do | |
cargo clippy --package=$pkg -- -D warnings | |
cargo build --locked --package=$pkg --release | |
done | |
- name: run tests common | |
if: steps.git-diff.outputs.diff | |
run: cargo test --release --package runtime-common | |
build-lint: | |
strategy: | |
matrix: | |
runtime: [sydney, brooklyn] | |
fail-fast: false | |
if: github.event_name == 'pull_request' | |
## Run only if a PR is made for the main branch | |
runs-on: buildjet-32vcpu-ubuntu-2204 | |
container: ggxdocker/ggxnode-dev:v1 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
persist-credentials: false | |
- run: git config --global --add safe.directory "*" | |
- uses: technote-space/[email protected] | |
id: git-diff | |
with: | |
PATTERNS: | | |
**/**.rs | |
Cargo.lock | |
- uses: dsherret/rust-toolchain-file@v1 | |
if: steps.git-diff.outputs.diff | |
- uses: buildjet/cache@v4 | |
if: steps.git-diff.outputs.diff | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: clippy | |
if: steps.git-diff.outputs.diff | |
run: | | |
cargo clippy --package=ggxchain-node --no-default-features --features=${{ matrix.runtime }} -- -D warnings | |
- name: build | |
if: steps.git-diff.outputs.diff | |
run: | | |
cargo build --locked --package=ggxchain-node --release --no-default-features --features=${{ matrix.runtime }} | |
- name: test | |
if: steps.git-diff.outputs.diff | |
run: | | |
cargo test --locked --package=ggxchain-node --release --no-default-features --features=${{ matrix.runtime }} |