-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fuel core 0.13 upgrade #657
Changes from all commits
5f78520
055c803
a76ce6a
32d81ce
ec5e72f
dcd5f1c
65af1dd
a544467
69d163a
5da1caf
6aacbd2
5824968
45bcba7
3eebb42
e857b29
5257e08
3c6ad16
f1bd08f
2e8a264
fa1578d
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 |
---|---|---|
|
@@ -16,9 +16,9 @@ env: | |
CARGO_TERM_COLOR: always | ||
DASEL_VERSION: https://github.com/TomWright/dasel/releases/download/v1.24.3/dasel_linux_amd64 | ||
RUSTFLAGS: "-D warnings" | ||
FUEL_CORE_VERSION: 0.11.2 | ||
FUEL_CORE_VERSION: 0.13.1 | ||
RUST_VERSION: 1.64.0 | ||
FORC_VERSION: 0.28.1 | ||
FORC_VERSION: 0.29.0 | ||
|
||
jobs: | ||
setup-test-projects: | ||
|
@@ -39,32 +39,32 @@ jobs: | |
run: | | ||
git config --global core.bigfilethreshold 100m | ||
|
||
- name: Install Forc | ||
run: | | ||
curl -sSLf https://github.com/FuelLabs/sway/releases/download/v${{ env.FORC_VERSION }}/forc-binaries-linux_amd64.tar.gz -L -o forc.tar.gz | ||
tar -xvf forc.tar.gz | ||
chmod +x forc-binaries/forc | ||
mv forc-binaries/forc /usr/local/bin/forc | ||
|
||
- name: Build Sway Examples | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: run | ||
args: --bin build-test-projects | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
retention-days: 2 | ||
name: sway-examples | ||
# cache only the sway build artifacts, skip all src files | ||
path: | | ||
packages/fuels/tests | ||
!packages/fuels/tests/*.rs | ||
!packages/fuels/tests/**/*.rs | ||
!packages/fuels/tests/**/*.sw | ||
!packages/fuels/tests/**/Forc.toml | ||
!packages/fuels/tests/**/Forc.lock | ||
!packages/fuels/tests/.gitignore | ||
# - name: Install Forc | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. commented out until forc can be released using this version of the sdk |
||
# run: | | ||
# curl -sSLf https://github.com/FuelLabs/sway/releases/download/v${{ env.FORC_VERSION }}/forc-binaries-linux_amd64.tar.gz -L -o forc.tar.gz | ||
# tar -xvf forc.tar.gz | ||
# chmod +x forc-binaries/forc | ||
# mv forc-binaries/forc /usr/local/bin/forc | ||
# | ||
# - name: Build Sway Examples | ||
# uses: actions-rs/cargo@v1 | ||
# with: | ||
# command: run | ||
# args: --bin build-test-projects | ||
|
||
# - uses: actions/upload-artifact@v2 | ||
# with: | ||
# retention-days: 2 | ||
# name: sway-examples | ||
# # cache only the sway build artifacts, skip all src files | ||
# path: | | ||
# packages/fuels/tests | ||
# !packages/fuels/tests/*.rs | ||
# !packages/fuels/tests/**/*.rs | ||
# !packages/fuels/tests/**/*.sw | ||
# !packages/fuels/tests/**/Forc.toml | ||
# !packages/fuels/tests/**/Forc.lock | ||
# !packages/fuels/tests/.gitignore | ||
|
||
get-workspace-members: | ||
runs-on: ubuntu-latest | ||
|
@@ -78,8 +78,8 @@ jobs: | |
# install dasel | ||
curl -sSLf "$DASEL_VERSION" -L -o dasel && chmod +x dasel | ||
mv ./dasel /usr/local/bin/dasel | ||
members=$(cat Cargo.toml | dasel -r toml -w json 'workspace.members' | jq -r ".[]" | xargs -L 1 basename | jq -R '[.]' | jq -s -c 'add') | ||
echo "::set-output name=members::$members" | ||
members=$(cat Cargo.toml | dasel -r toml -w json 'workspace.members' | jq -r ".[]" | xargs -I '{}' dasel -f {}/Cargo.toml 'package.name' | jq -R '[.]' | jq -s -c 'add') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fix cargo check to use actual package names, before each job was checking the whole project |
||
echo "members=$members" >> $GITHUB_OUTPUT | ||
|
||
verify-rust-version: | ||
runs-on: ubuntu-latest | ||
|
@@ -117,14 +117,16 @@ jobs: | |
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixes strange errors that appear when master is ahead of the current branch. By default this action will merge master with the PR on checkout, which can cause confusion when you encounter error messages related to code changes not on the current branch. |
||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ env.RUST_VERSION }} | ||
override: true | ||
# selecting a toolchain either by action or manual `rustup` calls should happen | ||
# before the cache plugin, as it uses the current rustc version as its cache key | ||
- uses: Swatinem/rust-cache@v1 | ||
- uses: Swatinem/rust-cache@v2.0.1 | ||
continue-on-error: true | ||
with: | ||
key: "${{ matrix.command }} ${{ matrix.args }} ${{ matrix.package }}" | ||
|
@@ -135,10 +137,10 @@ jobs: | |
|
||
- name: Install WebAssembly Test harness | ||
if: ${{ matrix.command == 'test' }} | ||
uses: actions-rs/cargo@v1 | ||
uses: baptiste0928/cargo-install@v1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. takes ~1s with a warm cache instead of ~5m |
||
with: | ||
command: install | ||
args: webassembly-test-runner | ||
crate: webassembly-test-runner | ||
cache-key: '${{ matrix.command }} ${{ matrix.args }} ${{ matrix.package }}' | ||
|
||
# TODO: Enable WASM tests | ||
# - name: Test WASM package | ||
|
@@ -164,12 +166,12 @@ jobs: | |
if: ${{ matrix.command == 'clippy' }} | ||
run: rustup component add clippy | ||
|
||
- name: Download sway example artifacts | ||
if: ${{ matrix.command == 'test' || matrix.command == 'clippy' }} | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: sway-examples | ||
path: packages/fuels/tests/ | ||
# - name: Download sway example artifacts | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. commented out until forc can be released using this version of the sdk |
||
# if: ${{ matrix.command == 'test' || matrix.command == 'clippy' }} | ||
# uses: actions/download-artifact@v3 | ||
# with: | ||
# name: sway-examples | ||
# path: packages/fuels/tests/ | ||
|
||
- name: Cargo (workspace-level) | ||
if: ${{ !matrix.package }} | ||
|
@@ -183,7 +185,7 @@ jobs: | |
uses: actions-rs/cargo@v1 | ||
with: | ||
command: ${{ matrix.command }} | ||
args: ${{ matrix.args }} | ||
args: -p ${{ matrix.package }} ${{ matrix.args }} | ||
|
||
- name: Check Docs. Validity | ||
uses: actions-rs/cargo@v1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ docs/book/ | |
packages/fuels/tests/**/**/Forc.lock | ||
|
||
# Don't add out/ files from test Sway projects. | ||
packages/fuels/tests/**/**/out/ | ||
# packages/fuels/tests/**/**/out/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO you need to remove this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was intentional.
We can't get these sway files to work with the new VM without this version of forc. However forc can't be released until the SDK is published with fuel-core v0.13 support. See this thread for more context: https://fuellabs.slack.com/archives/C02RU9MNVKN/p1666934602020589 |
||
|
||
# Don't add target/ files from test Sway projects. | ||
packages/fuels/tests/**/**/target/ |
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.
commented out until forc can be released using this version of the sdk