-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate forc-client from the sway repo
#143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 250 commits
ae6af40
4339140
3b4bb79
c822649
ab81b81
6a35b61
95027af
61a49c3
58a34dd
c4cccf5
f78f0b2
6d97134
5d1fdaf
450708d
42f92a3
9513fec
f45a54d
719f413
a26ca06
f66329a
7743839
307c25c
1a55c36
516a96e
5bc0fb6
2614552
92a8d53
624fd2f
15e4e47
888b04f
8d1c199
b71d6e8
29bc6d6
1dcdcd7
14c95aa
98f7a2f
b0462a1
507eaae
723e654
d7ad024
a21277f
d41572a
3ff10af
df1a792
40fe0fc
83f6348
06b96e1
2a63942
6d696d1
9b36bda
897e83b
bbd441b
744a4cd
cc8ddc2
8bbd7d3
816254b
71aba0a
18c9a02
efb89af
d9139b3
192cf02
d65c3c1
a9fc606
f8d2052
52b5d83
3330197
6f94e3c
e78fe1d
91d6986
6aefd03
095064e
e7d8646
98a3f1d
0aeda82
e7f420b
e35979f
3aeed27
11928b3
e893334
87ecea2
a5357e7
441f591
7d51b9a
e26a855
4210672
cdaff61
77679e0
f841de4
baa2afe
1a1dc0e
985f783
adde671
3d81298
362fe7a
7aff633
4320a2c
f3eb138
48c472b
bd6df15
ad3424c
4da1498
2a5ff70
f526896
3bc05a0
4bd1fce
c0371b1
e13b0ca
2b71613
07fed75
1fd0ca3
0d07ad1
9e511c5
e095376
708b19c
12843c3
c680f52
d619bf2
f5e9bf3
97a562d
349c530
a8623b3
457f9a9
605851b
8404d5e
d875329
688360b
37b20e1
a55a462
185c08f
2200431
35974b0
33eeeaf
28e1e7d
35ebeb0
62d89aa
611bcbf
8185d0f
4c083a5
ca55302
b2c93e3
9309b82
62f4770
ee77aed
681c045
e1a66d7
15b45ac
d05a4c9
416d7c2
4ed09ee
d0dfbcc
227293e
2969c0a
35afa43
a067450
0b83ac0
7a015c8
87f7d7c
93ac348
cb8fa90
2e6b90d
c0df49e
96f9b21
8cd809b
45a34cd
cbc4f6e
a9c4a67
602ce89
c96c985
47a3f1e
d08e818
136cad9
42e8100
73a24e8
aa2ebc0
48b84c6
6e7fd26
fcd76e6
f65d490
456e0e1
be78094
bdd657a
04bb634
993e898
e809585
ae28c72
0253ea1
f31ca35
9c1be90
9185de5
05b4d8d
8f4d8c8
e4ccd29
2ec09e7
cd04614
b136585
4afc11e
b8f42f3
5889dc6
cfb6fc9
b927808
e69fd89
0f06eea
35aee32
316d41a
29a9bd6
cff643d
d4d4414
ff0f1a2
be9ce63
c4ff444
758e033
1c4eca1
c08949c
973a6db
fa36cd1
800450d
f6d57d9
9e74608
d3b45b6
f6fd3a0
397cdad
e175511
cc47347
38fe10b
b677d86
0b53a4b
a53a50b
011267a
1ea5ca6
51837ca
3974350
73251b1
e45ab7b
f79bbc4
1860330
a9fb2ae
0bba1a4
d12b543
858d097
2cf7f75
a761a4d
71708d1
e9b7134
9857057
983e1b9
7775990
831fbde
76ee7a7
e690891
2c95a98
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,9 +24,25 @@ jobs: | |
| with: | ||
| access_token: ${{ github.token }} | ||
|
|
||
| get-fuel-core-version: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| fuel_core_version: ${{ steps.get-version.outputs.fuel_core_version }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Get fuel-core version | ||
| id: get-version | ||
| run: | | ||
| version=$(grep 'fuel-core-client' Cargo.toml | head -1 | sed -E 's/.*version = "([0-9]+\.[0-9]+)".*/\1/') | ||
| # Append .1 to get the patch version (e.g., 0.47 -> 0.47.1) | ||
| version="${version}.1" | ||
| echo "fuel_core_version=$version" >> $GITHUB_OUTPUT | ||
| echo "Detected fuel-core version: $version" | ||
|
|
||
| publish-codecov: | ||
| name: Check code coverage (branch) | ||
| runs-on: ubuntu-latest | ||
| needs: get-fuel-core-version | ||
| runs-on: warp-ubuntu-latest-x64-4x | ||
| permissions: # Write access to push changes to pages | ||
| contents: write | ||
| pull-requests: write | ||
|
|
@@ -36,6 +52,16 @@ jobs: | |
| uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: ${{ env.NIGHTLY_RUST_VERSION }} | ||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| cache-provider: "warpbuild" | ||
|
|
||
| - name: Install fuel-core for tests | ||
| run: | | ||
| curl -sSLf https://github.com/FuelLabs/fuel-core/releases/download/v${{ needs.get-fuel-core-version.outputs.fuel_core_version }}/fuel-core-${{ needs.get-fuel-core-version.outputs.fuel_core_version }}-x86_64-unknown-linux-gnu.tar.gz -L -o fuel-core.tar.gz | ||
| tar -xvf fuel-core.tar.gz | ||
| chmod +x fuel-core-${{ needs.get-fuel-core-version.outputs.fuel_core_version }}-x86_64-unknown-linux-gnu/fuel-core | ||
| mv fuel-core-${{ needs.get-fuel-core-version.outputs.fuel_core_version }}-x86_64-unknown-linux-gnu/fuel-core /usr/local/bin/fuel-core | ||
|
|
||
| - name: Install cargo-llvm-codecov | ||
| uses: taiki-e/install-action@cargo-llvm-cov | ||
|
|
@@ -84,7 +110,7 @@ jobs: | |
| SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }} | ||
|
|
||
| cargo-verifications: | ||
| needs: cancel-previous-runs | ||
| needs: [cancel-previous-runs] | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
|
|
@@ -95,25 +121,52 @@ jobs: | |
| args: --all-targets --all-features | ||
| - command: check | ||
| args: --locked --all-targets --all-features | ||
| - command: test | ||
| args: --all-targets --all-features | ||
| - command: test | ||
| args: --all-targets --no-default-features | ||
| # disallow any job that takes longer than 30 minutes | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions-rs/toolchain@v1 | ||
| - uses: actions/checkout@v3 | ||
| - name: Install toolchain | ||
| uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: stable | ||
| - uses: Swatinem/rust-cache@v1 | ||
| toolchain: ${{ env.RUST_VERSION }} | ||
| components: rustfmt, clippy | ||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| cache-provider: "github" | ||
| key: "${{ matrix.command }}${{ matrix.args }}" | ||
| - name: ${{ matrix.command }} ${{ matrix.args }} | ||
| uses: actions-rs/cargo@v1 | ||
| run: cargo ${{ matrix.command }} ${{ matrix.args }} | ||
| env: | ||
| RUSTFLAGS: "-D warnings" | ||
|
|
||
| cargo-test: | ||
| name: cargo test | ||
| needs: [cancel-previous-runs, get-fuel-core-version] | ||
| runs-on: warp-ubuntu-latest-x64-4x | ||
| strategy: | ||
| matrix: | ||
| include: | ||
| - args: --all-targets --all-features -- --test-threads 1 | ||
| - args: --all-targets --no-default-features -- --test-threads 1 | ||
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Install toolchain | ||
| uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| command: ${{ matrix.command }} | ||
| args: ${{ matrix.args }} | ||
| toolchain: ${{ env.RUST_VERSION }} | ||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| cache-provider: "warpbuild" | ||
| key: "test${{ matrix.args }}" | ||
| - name: Install fuel-core for tests | ||
| run: | | ||
| curl -sSLf https://github.com/FuelLabs/fuel-core/releases/download/v${{ needs.get-fuel-core-version.outputs.fuel_core_version }}/fuel-core-${{ needs.get-fuel-core-version.outputs.fuel_core_version }}-x86_64-unknown-linux-gnu.tar.gz -L -o fuel-core.tar.gz | ||
| tar -xvf fuel-core.tar.gz | ||
| chmod +x fuel-core-${{ needs.get-fuel-core-version.outputs.fuel_core_version }}-x86_64-unknown-linux-gnu/fuel-core | ||
| mv fuel-core-${{ needs.get-fuel-core-version.outputs.fuel_core_version }}-x86_64-unknown-linux-gnu/fuel-core /usr/local/bin/fuel-core | ||
| - name: cargo test ${{ matrix.args }} | ||
| run: cargo test --locked ${{ matrix.args }} | ||
| env: | ||
| RUSTFLAGS: "-D warnings" | ||
| - name: Notify if Job Fails | ||
| uses: ravsamhq/notify-slack-action@v1 | ||
| if: always() && github.ref == 'refs/heads/master' | ||
|
|
@@ -134,6 +187,7 @@ jobs: | |
| needs: | ||
| - lint-toml-files | ||
| - cargo-verifications | ||
| - cargo-test | ||
| if: github.event_name == 'release' && github.event.action == 'published' | ||
| runs-on: ubuntu-latest | ||
|
|
||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded patch version may cause CI download failures
Medium Severity
The version extraction script hardcodes
.1as the patch version (e.g., converting "0.47" to "0.47.1"). This is fragile because the actual fuel-core release might be.0,.2, or another patch number. If fuel-core 0.47.1 doesn't exist in GitHub releases, thecurlcommand will fail. Additionally, ifCargo.tomlis ever updated to specify a full version like "0.47.2", the regex pattern([0-9]+\.[0-9]+)"won't match (it expects a quote immediately after two numeric segments), causing the sed to output the entire line unchanged.