Skip to content

Commit

Permalink
refactor setup so cli download is separate from rust env
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally committed Aug 14, 2024
1 parent 9c17b64 commit 6349ed2
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 21 deletions.
18 changes: 18 additions & 0 deletions .github/actions/get_cli/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: get cli bin
description: use pre-build libra-cli bin for CI
runs:
using: composite
steps:
- name: export diem-node DIEM_FORGE_NODE_BIN_PATH
shell: bash
run: |
echo "DIEM_FORGE_NODE_BIN_PATH=${{github.workspace}}/libra" >> $GITHUB_ENV
echo "LIBRA_BIN=${{github.workspace}}/libra" >> $GITHUB_ENV
- name: install diem-node (for smoke tests)
shell: bash
run: >
wget -O $DIEM_FORGE_NODE_BIN_PATH https://github.com/0LNetworkCommunity/libra-framework/releases/download/ci/libra &&
sudo chmod 755 $DIEM_FORGE_NODE_BIN_PATH &&
echo $DIEM_FORGE_NODE_BIN_PATH &&
ls -l $DIEM_FORGE_NODE_BIN_PATH
File renamed without changes.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: setup env
uses: ./.github/actions/build_env
- uses: ./.github/actions/build_env

- uses: ./.github/actions/get_cli

- uses: Swatinem/[email protected]
with:
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/formal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,17 @@ jobs:
- name: setup env
uses: ./.github/actions/build_env

- uses: Swatinem/[email protected]
with:
shared-key: "libra-framework"
cache-all-crates: true
# - uses: Swatinem/[email protected]
# with:
# shared-key: "libra-framework"
# cache-all-crates: true

- name: install prover dependencies
run: |
bash util/dev_setup.sh -byp
- name: install diem (for move tests)
run: |
wget -O ${{github.workspace}}/diem https://github.com/0LNetworkCommunity/diem/releases/latest/download/diem &&
chmod +x ${{github.workspace}}/diem &&
cp ${{github.workspace}}/diem ~/.cargo/bin
- name: fetch libra cli
uses: ./.github/actions/get_cli

# Move framework tests
# TODO:
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/move.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,10 @@ jobs:

- uses: actions/checkout@v3

- name: install diem (for move tests)
run: >
wget -O ${{github.workspace}}/diem https://github.com/0LNetworkCommunity/diem/releases/latest/download/diem &&
chmod +x ${{github.workspace}}/diem
- uses: Swatinem/[email protected]
with:
shared-key: "libra-framework"
cache-all-crates: true
- name: fetch libra cli
uses: ./.github/actions/get_cli

# Move framework tests
- name: move framework
working-directory: ./framework/libra-framework
run: ${{github.workspace}}/diem move test
run: $LIBRA_BIN move test

0 comments on commit 6349ed2

Please sign in to comment.