diff --git a/.github/actions/get_cli/action.yaml b/.github/actions/get_cli/action.yaml new file mode 100644 index 000000000..61f0ac341 --- /dev/null +++ b/.github/actions/get_cli/action.yaml @@ -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 diff --git a/.github/actions/build_env/action.yaml b/.github/actions/rust_env/action.yaml similarity index 100% rename from .github/actions/build_env/action.yaml rename to .github/actions/rust_env/action.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e9d11b6d4..6c7fd255e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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/rust-cache@v2.7.3 with: diff --git a/.github/workflows/formal.yaml b/.github/workflows/formal.yaml index 7dc148420..f4d3a747e 100644 --- a/.github/workflows/formal.yaml +++ b/.github/workflows/formal.yaml @@ -34,20 +34,17 @@ jobs: - name: setup env uses: ./.github/actions/build_env - - uses: Swatinem/rust-cache@v2.7.3 - with: - shared-key: "libra-framework" - cache-all-crates: true + # - uses: Swatinem/rust-cache@v2.7.3 + # 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: diff --git a/.github/workflows/move.yaml b/.github/workflows/move.yaml index e7bd0959a..11420a0a9 100644 --- a/.github/workflows/move.yaml +++ b/.github/workflows/move.yaml @@ -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/rust-cache@v2.7.3 - 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