Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
cuishuang committed Apr 28, 2024
2 parents 09b9fdb + ec22cb6 commit 538c5c6
Show file tree
Hide file tree
Showing 2,069 changed files with 43,773 additions and 13,931 deletions.
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# Syntax highlighting of sway files as rust
*.sw linguist-language=Rust

# Syntax highlighting of ir files as LLVM
*.ir linguist-language=LLVM
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [ ] I have linked to any relevant issues.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
Expand Down
73 changes: 57 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,27 @@ jobs:
- name: Run the formatter against all sway projects and fail if any of them panic
run: scripts/formatter/forc-fmt-check-panic.sh

check-sdk-harness-test-suite-compatibility:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Install toml-cli
run: cargo install toml-cli

- name: Read and compare versions
env:
PACKAGE_NAMES: "fuel-core-client" # multiple packages can be specified delimeted with `,`.
run: |
.github/workflows/scripts/check-sdk-harness-version.sh
build-mdbook:
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
Expand Down Expand Up @@ -287,7 +308,7 @@ jobs:
crate: cargo-toml-lint
version: '0.1'
- name: Run Cargo.toml linter
run: git ls-files | grep Cargo.toml$ | grep -v 'templates/sway-test-rs' | xargs --verbose -n 1 cargo-toml-lint
run: git ls-files | grep Cargo.toml$ | grep -v 'templates/' | xargs --verbose -n 1 cargo-toml-lint

cargo-fmt-check:
runs-on: ubuntu-latest
Expand All @@ -304,38 +325,44 @@ jobs:
cargo-run-e2e-test:
runs-on: ubuntu-latest
needs: get-fuel-core-version
services:
fuel-core:
image: ghcr.io/fuellabs/fuel-core:v${{ needs.get-fuel-core-version.outputs.fuel_core_version }}
ports:
- 4000:4000
steps:
- name: Install fuel-core for tests
uses: baptiste0928/cargo-install@v2
with:
crate: fuel-core-bin
version: ${{ needs.get-fuel-core-version.outputs.fuel_core_version }}
- uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
- name: Cargo Run E2E Tests (Fuel VM)
run: cargo run --locked --release --bin test -- --locked
run: |
fuel-core run --db-type in-memory --debug --snapshot ./.github/workflows/local-testnode &
sleep 5 &&
cargo run --locked --release --bin test -- --locked
cargo-run-e2e-test-release:
runs-on: ubuntu-latest
needs: get-fuel-core-version
services:
fuel-core:
image: ghcr.io/fuellabs/fuel-core:v${{ needs.get-fuel-core-version.outputs.fuel_core_version }}
ports:
- 4000:4000
steps:
- name: Install fuel-core for tests
uses: baptiste0928/cargo-install@v2
with:
crate: fuel-core-bin
version: ${{ needs.get-fuel-core-version.outputs.fuel_core_version }}
- uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
- name: Cargo Run E2E Tests (Fuel VM)
run: cargo run --locked --release --bin test -- --locked --release
run: |
fuel-core run --db-type in-memory --debug --snapshot ./.github/workflows/local-testnode &
sleep 5 &&
cargo run --locked --release --bin test -- --locked --release
cargo-run-e2e-test-evm:
runs-on: ubuntu-latest
Expand All @@ -347,7 +374,7 @@ jobs:
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
- name: Cargo Run E2E Tests (EVM)
run: cargo run --locked --release --bin test -- --target evm --locked
run: cargo run --locked --release --bin test -- --target evm --locked --no-encoding-v1

cargo-run-e2e-test-midenvm:
runs-on: ubuntu-latest
Expand All @@ -359,7 +386,7 @@ jobs:
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
- name: Cargo Run E2E Tests (EVM)
run: cargo run --locked --release --bin test -- --target midenvm --locked
run: cargo run --locked --release --bin test -- --target midenvm --locked --no-encoding-v1

# TODO: Remove this upon merging std tests with the rest of the E2E tests.
cargo-test-lib-std:
Expand Down Expand Up @@ -483,6 +510,17 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --locked --release -p forc-debug
cargo-test-sway-lsp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
- name: Run sway-lsp tests sequentially
run: cargo test --locked --release -p sway-lsp -- --nocapture --test-threads=1
cargo-test-workspace:
runs-on: ubuntu-latest
steps:
Expand All @@ -493,7 +531,7 @@ jobs:
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --locked --release --workspace --exclude forc-debug
run: cargo test --locked --release --workspace --exclude forc-debug --exclude sway-lsp
cargo-unused-deps-check:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -523,6 +561,7 @@ jobs:
cargo-run-e2e-test-evm,
cargo-test-lib-std,
cargo-test-workspace,
cargo-test-sway-lsp,
cargo-unused-deps-check,
]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -608,6 +647,7 @@ jobs:
cargo-run-e2e-test-evm,
cargo-test-lib-std,
cargo-test-workspace,
cargo-test-sway-lsp,
cargo-unused-deps-check,
pre-publish-check,
]
Expand Down Expand Up @@ -656,6 +696,7 @@ jobs:
cargo-run-e2e-test-evm,
cargo-test-lib-std,
cargo-test-workspace,
cargo-test-sway-lsp,
cargo-unused-deps-check,
]
if: github.ref == 'refs/heads/master'
Expand Down

0 comments on commit 538c5c6

Please sign in to comment.