Skip to content

Commit

Permalink
Merge branch 'main' into testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
AurelienFT committed Jan 3, 2023
2 parents 8a4bd2c + 08d87e0 commit e4ec4cc
Show file tree
Hide file tree
Showing 153 changed files with 4,208 additions and 1,301 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-11-14
toolchain: nightly-2022-12-24
target: ${{ matrix.target }}
override: true
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
if: matrix.platform != 'arm64'
with:
Expand Down
85 changes: 30 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main, staging, trying]
pull_request:
branches: [main]
branches: [main, 'testnet_*']
types:
- opened
- reopened
Expand All @@ -27,74 +27,42 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-11-14
toolchain: nightly-2022-12-24
components: rustfmt
override: true
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
with:
shared-key: "sanity"
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

check:
if: github.ref != 'refs/heads/staging'
needs: sanity
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-11-14
override: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: check

test:
if: github.ref != 'refs/heads/staging'
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
toolchain: nightly-2022-12-24
- uses: Swatinem/rust-cache@v2
with:
submodules: "recursive"
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-11-14
override: true
- uses: Swatinem/rust-cache@v1
shared-key: "check"
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: actions-rs/cargo@v1
with:
command: test
args: --lib

doctest:
if: github.ref != 'refs/heads/staging'
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-11-14
override: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: test
args: --doc
command: check

clippy:
if: github.ref != 'refs/heads/staging'
needs: check
needs: sanity
runs-on: ubuntu-latest
continue-on-error: true
steps:
Expand All @@ -104,10 +72,13 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-11-14
toolchain: nightly-2022-12-24
components: clippy
override: true
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
with:
shared-key: "clippy"
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -116,7 +87,6 @@ jobs:

# Full cross-platform tests required by bors to merge on main branch
full:
if: github.ref == 'refs/heads/staging'
name: full
needs: sanity
runs-on: ${{ matrix.os }}
Expand All @@ -133,38 +103,43 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-11-14
toolchain: nightly-2022-12-24
override: true
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
with:
shared-key: "massa"
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: actions-rs/cargo@v1
with:
command: install
args: cargo-nextest
- uses: actions-rs/cargo@v1
with:
command: nextest
args: run --retries 2
args: run --features testing --retries 10

build: # quick hack because bors wrongly detect matrix jobs status
if: github.ref == 'refs/heads/staging'
needs: full
runs-on: ubuntu-latest
steps:
- run: exit 0

doc:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-11-14
toolchain: nightly-2022-12-24
components: rustfmt
override: true
- uses: Swatinem/rust-cache@v2
with:
shared-key: "doc"
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: actions-rs/cargo@v1
with:
command: doc
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.envrc
.idea
.vscode
.fleet
*.swp*
**/Cargo.lock
**/target
Expand Down
1 change: 1 addition & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ports:
- port: 31245
- port: 33034
- port: 33035
- port: 33036

tasks:
- init: cargo build
Loading

0 comments on commit e4ec4cc

Please sign in to comment.