Skip to content

Commit

Permalink
Merge pull request #1097 from godwokenrises/fix-rust-ci
Browse files Browse the repository at this point in the history
- chore: fix out-of-disk in the `rust.yml` workflow
- Fix kicker init in CI
  • Loading branch information
Flouse authored Oct 16, 2023
2 parents 7f9e0ae + 785f04e commit 972f340
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/godwoken-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
MANUAL_BUILD_GODWOKEN=true
GODWOKEN_GIT_URL="https://github.com/${{ github.repository }}"
GODWOKEN_GIT_CHECKOUT=${{ github.ref }}
MANUAL_BUILD_SCRIPTS=true
MANUAL_BUILD_SCRIPTS=false
SCRIPTS_GIT_URL="https://github.com/${{ github.repository }}"
SCRIPTS_GIT_CHECKOUT=${{ github.ref }}
MANUAL_BUILD_POLYJUICE=true
MANUAL_BUILD_POLYJUICE=false
POLYJUICE_GIT_URL="https://github.com/${{ github.repository }}"
POLYJUICE_GIT_CHECKOUT=${{ github.ref }}
MANUAL_BUILD_WEB3=true
Expand Down
36 changes: 30 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Build and Test
on: [push, pull_request]

jobs:
build:
rust-clippy-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust components
Expand All @@ -17,7 +17,10 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
key: ${{ runner.os }}-${{ runner.arch }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-cargo-test
${{ runner.os }}-${{ runner.arch }}-cargo
- name: Install moleculec v0.7.2
run: CARGO_TARGET_DIR=target/ cargo install moleculec --version 0.7.2
- name: Check format
Expand All @@ -42,7 +45,28 @@ jobs:
git submodule update --init --recursive --depth=1
make all-via-docker
- name: Tests
- name: Tests all targets
run: RUST_BACKTRACE=1 cargo test --all-targets
- name: Test TOML serialization
run: cargo run --bin godwoken -- generate-example-config -o test.toml

test-generate-example-config:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache of Cargo
id: cargo-test-cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ runner.arch }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-cargo-build
${{ runner.os }}-${{ runner.arch }}-cargo
- name: Test TOML serialization
run: cargo run --bin godwoken -- generate-example-config -o test.toml
14 changes: 7 additions & 7 deletions .github/workflows/web3-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ env:
MANUAL_BUILD_GODWOKEN: "true"
GODWOKEN_GIT_URL: "https://github.com/${{ github.repository }}"
GODWOKEN_GIT_CHECKOUT: "${{ github.ref }}"
MANUAL_BUILD_SCRIPTS: "true"
MANUAL_BUILD_SCRIPTS: "false"
SCRIPTS_GIT_URL: "https://github.com/${{ github.repository }}"
SCRIPTS_GIT_CHECKOUT: "${{ github.ref }}"
MANUAL_BUILD_POLYJUICE: "true"
MANUAL_BUILD_POLYJUICE: "false"
POLYJUICE_GIT_URL: "https://github.com/${{ github.repository }}"
POLYJUICE_GIT_CHECKOUT: "${{ github.ref }}"
MANUAL_BUILD_WEB3: "true"
Expand All @@ -23,7 +23,7 @@ env:
WEB3_GIT_CHECKOUT: "${{ github.ref }}"
GODWOKEN_KICKER_REPO: "godwokenrises/godwoken-kicker"
GODWOKEN_KICKER_REF: "develop"

DOCKER_MANUAL_BUILD_IMAGE: "retricsu/godwoken-manual-build:node18"

jobs:
web3-unit-tests:
Expand All @@ -49,10 +49,10 @@ jobs:
capsule --version
# Godwoken-Kicker
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: godwokenrises/godwoken-kicker
ref: 'develop'
repository: ${{ env.GODWOKEN_KICKER_REPO }}
ref: ${{ env.GODWOKEN_KICKER_REF }}
- name: Kicker init
run: ./kicker init
- name: Kicker start
Expand All @@ -71,7 +71,7 @@ jobs:
echo "REDIS_URL=redis://127.0.0.1:6379" >> $GITHUB_ENV
# Godwoken-Web3
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: godwoken-monorepo
- name: Get yarn cache directory path
Expand Down

0 comments on commit 972f340

Please sign in to comment.