Skip to content

Commit

Permalink
Update CI workflows #102
Browse files Browse the repository at this point in the history
* Added publish artifacts in build Mithril Client job
* Fixed cache issue in documentation job
  • Loading branch information
jpraynaud committed Apr 14, 2022
1 parent c67d330 commit fd5a849
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
override: true

- uses: actions/cache@v2.1.5
name: Cache mithril-core/Cargo.toml
name: Cache mithril-core/Cargo.lock
with:
path: |
~/.cargo/registry
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
override: true

- uses: actions/cache@v2.1.5
name: Cache mithril-network/mithril-aggregator/Cargo.toml
name: Cache mithril-network/mithril-aggregator/Cargo.lock
with:
path: |
~/.cargo/registry
Expand Down Expand Up @@ -218,6 +218,12 @@ jobs:
command: test
args: --release --manifest-path ./mithril-network/mithril-client/Cargo.toml

- name: Publish client
uses: actions/upload-artifact@v3
with:
name: mithril-client
path: mithril-network/mithril-client/target/release/mithril-client

build-mithril-node-poc:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -426,12 +432,14 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2

- name: Cache mithril-core/Cargo.toml
- name: Cache mithril-core/Cargo.lock
uses: actions/cache@v2.1.5
with:
path: |
~/.cargo/registry
~/.cargo/git
mithril-core/target
key: ${{ runner.os }}-${{ hashFiles('mithril-core/Cargo.toml') }}
key: ${{ runner.os }}-${{ hashFiles('mithril-core/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-key
Expand All @@ -442,11 +450,13 @@ jobs:
args: --manifest-path ./mithril-core/Cargo.toml --target-dir ./github-pages/mithril-core

- uses: actions/cache@v2.1.5
name: Cache mithril-network/mithril-aggregator/Cargo.toml
name: Cache mithril-network/mithril-aggregator/Cargo.lock
with:
path: |
~/.cargo/registry
~/.cargo/git
mithril-network/mithril-aggregator/target
key: ${{ runner.os }}-${{ hashFiles('mithril-network/mithril-aggregator/Cargo.toml') }}
key: ${{ runner.os }}-${{ hashFiles('mithril-network/mithril-aggregator/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-key
Expand All @@ -456,11 +466,22 @@ jobs:
command: doc
args: --manifest-path ./mithril-network/mithril-aggregator/Cargo.toml --target-dir ./github-pages/mithril-network/mithril-aggregator

- uses: actions/cache@v2.1.5
name: Cache mithril-network/mithril-client/Cargo.lock
with:
path: |
~/.cargo/registry
~/.cargo/git
mithril-network/mithril-client/target
key: ${{ runner.os }}-${{ hashFiles('mithril-network/mithril-client/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-key
- name: Mithril Client / Generate doc
uses: actions-rs/cargo@v1
with:
command: doc
args: --manifest-path ./mithril-network/mithril-aggregator/Cargo.toml --target-dir ./github-pages/mithril-network/mithril-client
args: --manifest-path ./mithril-network/mithril-client/Cargo.toml --target-dir ./github-pages/mithril-network/mithril-client

- name: Mithril Aggregator / Generate OpenAPI UI
uses: Legion2/swagger-ui-action@v1
Expand Down Expand Up @@ -493,7 +514,7 @@ jobs:

build-test-lab:
runs-on: ubuntu-latest
needs: [ build-mithril-core, build-mithril-aggregator, build-mithril-client ]
needs: [ build-mithril-core, build-mithril-aggregator ]
steps:
- name: Checkout sources
uses: actions/checkout@v2
Expand Down Expand Up @@ -533,3 +554,4 @@ jobs:

- name: Test
run: nix-shell --run '.github/workflows/ci-test.sh'

0 comments on commit fd5a849

Please sign in to comment.