Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
CI: add dove prove check, optimize job sequence (#219)
Browse files Browse the repository at this point in the history
* CI: add `dove prove` checks

* use get-boogie gh-action, optimize jobs

* fix jobs priorities

* fix jobs priorities

* fix typo

* missed submodules-recursive
  • Loading branch information
boozook authored Feb 20, 2022
1 parent 03b38de commit c95fed7
Showing 1 changed file with 108 additions and 22 deletions.
130 changes: 108 additions & 22 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
override: true
components: rustfmt, clippy

- name: restore rust cache
- name: Rusty cache
uses: Swatinem/rust-cache@v1

- name: Check formatting
Expand All @@ -34,11 +34,11 @@ jobs:
args: --tests --examples -- -Dwarnings

tests:
name: test (${{ matrix.name }})
name: Units (${{ matrix.name }})
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
fail-fast: true
matrix:
include:
- name: macos
Expand Down Expand Up @@ -76,10 +76,11 @@ jobs:
profile: minimal
override: true

- uses: Swatinem/rust-cache@v1
- name: Rusty cache
uses: Swatinem/rust-cache@v1

# Clearing cache "~/.move/" before testing
- name: dove clean --global
- name: Build, dove clean --global
uses: actions-rs/cargo@v1
with:
command: run
Expand All @@ -100,25 +101,16 @@ jobs:
command: test
args: --no-fail-fast --all --all-features

- name: dove build --path ./dove/resources/for_tests/move-stdlib
uses: actions-rs/cargo@v1
with:
command: run
args: -- build --path ./dove/resources/for_tests/move-stdlib

- name: dove build --doc --path ./dove/resources/for_tests/move-stdlib
uses: actions-rs/cargo@v1
with:
command: run
args: -- build --doc --path ./dove/resources/for_tests/move-stdlib

- name: dove test --path ./dove/resources/for_tests/move-stdlib
uses: actions-rs/cargo@v1
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
command: run
args: -- test --path ./dove/resources/for_tests/move-stdlib
name: dove-${{ matrix.name }}
path: target/debug/dove
if-no-files-found: error
retention-days: 1

install:
needs: clippy
name: install (${{ matrix.name }})
runs-on: ${{ matrix.os }}

Expand All @@ -136,6 +128,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive

- name: Restore from cache and run vcpkg
if: ${{ matrix.platform == 'win' }}
Expand All @@ -153,11 +147,103 @@ jobs:
profile: minimal
override: true

- uses: Swatinem/rust-cache@v1
- name: Rusty cache
uses: Swatinem/rust-cache@v1

- name: Build & Install Dove
uses: actions-rs/cargo@v1
with:
command: install
args: --path=dove

proover:
needs: tests
name: proover (${{ matrix.name }})
runs-on: ${{ matrix.os }}

strategy:
fail-fast: true
matrix:
include:
- name: macos
os: macos-latest
- name: ubuntu
os: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive

- name: Install Boogie
uses: pontem-network/get-boogie@main
with:
ref: 927c229cd8dfa6dcd50ba84811f80d10496c76d2
token: ${{ secrets.GITHUB_TOKEN }}

- name: Download artifact
uses: actions/download-artifact@v2
with:
name: dove-${{ matrix.name }}
path: ./bin
- name: Prepare dove
run: chmod +x ./bin/dove && echo "./bin" >> $GITHUB_PATH

- name: Proove move-stdlib
run: dove prove -p=dove/resources/for_tests/move-stdlib/

builds:
needs: tests
name: Builds (${{ matrix.name }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: macos
os: macos-latest
- name: ubuntu
os: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive

- name: Download artifact
uses: actions/download-artifact@v2
with:
name: dove-${{ matrix.name }}
path: ./bin
- name: Prepare dove
run: chmod +x ./bin/dove && echo "./bin" >> $GITHUB_PATH

- run: dove build --path ./dove/resources/for_tests/move-stdlib
- run: dove build --doc --path ./dove/resources/for_tests/move-stdlib
- run: dove test --path ./dove/resources/for_tests/move-stdlib

integration:
needs: tests
name: Integration (${{ matrix.name }})
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
include:
- name: macos
os: macos-latest
- name: ubuntu
os: ubuntu-latest

steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: dove-${{ matrix.name }}
path: ./bin
- name: Prepare dove
run: chmod +x ./bin/dove && echo "./bin" >> $GITHUB_PATH
# TODO: download the node

0 comments on commit c95fed7

Please sign in to comment.