diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index bc57238cfe..e5fce06bd4 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -28,6 +28,19 @@ jobs: DOCKER_CLI_EXPERIMENTAL: enabled steps: - uses: actions/checkout@v2 + - name: Cache cargo directory + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Cache target aarch64 release directory + uses: actions/cache@v2 + with: + path: target/aarch64-unknown-linux-gnu/release + key: ${{ runner.os }}-target-aarch64-release-portable-${{ hashFiles('**/Cargo.lock') }} - name: Dockerhub login run: | echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 9241124fc1..54ae6e3c7f 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -3,7 +3,7 @@ name: test-suite on: push: branches: - - master + - unstable - staging - trying - 'pr/*' @@ -11,6 +11,7 @@ on: env: # Deny warnings in CI RUSTFLAGS: "-D warnings" + PORTABLE: true jobs: cargo-fmt: name: cargo-fmt @@ -27,6 +28,19 @@ jobs: needs: cargo-fmt steps: - uses: actions/checkout@v1 + - name: Cache cargo directory + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Cache target release directory + uses: actions/cache@v2 + with: + path: target/release + key: ${{ runner.os }}-target-release-portable-${{ hashFiles('**/Cargo.lock') }} - name: Get latest version of stable Rust run: rustup update stable - name: Install ganache-cli @@ -39,6 +53,19 @@ jobs: needs: cargo-fmt steps: - uses: actions/checkout@v1 + - name: Cache cargo directory + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Cache target debug directory + uses: actions/cache@v2 + with: + path: target/debug + key: ${{ runner.os }}-target-debug-portable-${{ hashFiles('**/Cargo.lock') }} - name: Get latest version of stable Rust run: rustup update stable - name: Install ganache-cli @@ -79,6 +106,19 @@ jobs: needs: cargo-fmt steps: - uses: actions/checkout@v1 + - name: Cache cargo directory + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Cache target release directory + uses: actions/cache@v2 + with: + path: target/release + key: ${{ runner.os }}-target-release-portable-${{ hashFiles('**/Cargo.lock') }} - name: Install ganache-cli run: sudo npm install -g ganache-cli - name: Run the beacon chain sim that starts from an eth1 contract @@ -89,6 +129,19 @@ jobs: needs: cargo-fmt steps: - uses: actions/checkout@v1 + - name: Cache cargo directory + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Cache target release directory + uses: actions/cache@v2 + with: + path: target/release + key: ${{ runner.os }}-target-release-portable-${{ hashFiles('**/Cargo.lock') }} - name: Install ganache-cli run: sudo npm install -g ganache-cli - name: Run the beacon chain sim without an eth1 connection