Skip to content

Commit

Permalink
Build with Forc.lock file (#254)
Browse files Browse the repository at this point in the history
## Type of change

<!--Delete points that do not apply-->

- New feature

## Changes

The following changes have been made:

- Forces CI to build with Forc.lock file

## Checklist

- [ ] 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)
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] 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).
- [x] I have requested a review from the relevant team or maintainers.
  • Loading branch information
bitzoic committed Jun 7, 2024
1 parent 172adbb commit 3b6959b
Show file tree
Hide file tree
Showing 5 changed files with 596 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
run: cargo fmt --manifest-path tests/Cargo.toml --verbose --check

- name: Build All Libs
run: forc build --path libs --release
run: forc build --path libs --release --locked

- name: Build All Tests
run: forc build --path tests --release
run: forc build --path tests --release --locked

- name: Cargo Test sway-lib
run: |
Expand All @@ -78,10 +78,10 @@ jobs:
components: forc@${{ env.FORC_VERSION }}, fuel-core@${{ env.CORE_VERSION }}

- name: Run Libs Tests
run: forc build --path libs --release && forc test --path libs
run: forc build --path libs --release --locked && forc test --path libs --locked

- name: Run Tests Tests
run: forc build --path tests --release && forc test --path tests
run: forc build --path tests --release --locked && forc test --path tests --locked

contributing-book:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
run: cargo fmt --manifest-path examples/Cargo.toml --verbose --check

- name: Build All Examples
run: forc build --path examples --release
run: forc build --path examples --release --locked

- name: Cargo Test Examples
run: |
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
Forc.lock

# These are backup files generated by rustfmt
**/*.rs.bk
Expand Down
175 changes: 175 additions & 0 deletions examples/Forc.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
[[package]]
name = "admin_examples"
source = "member"
dependencies = [
"standards",
"std",
"sway_libs",
]

[[package]]
name = "base_docs"
source = "member"
dependencies = [
"standards",
"std",
"sway_libs",
]

[[package]]
name = "basic_src20"
source = "member"
dependencies = [
"standards",
"std",
"sway_libs",
]

[[package]]
name = "basic_src3"
source = "member"
dependencies = [
"standards",
"std",
"sway_libs",
]

[[package]]
name = "basic_src7"
source = "member"
dependencies = [
"standards",
"std",
"sway_libs",
]

[[package]]
name = "bytecode_examples"
source = "member"
dependencies = [
"std",
"sway_libs",
]

[[package]]
name = "core"
source = "path+from-root-E19CE48B3E858B72"

[[package]]
name = "fixed_point_examples"
source = "member"
dependencies = [
"std",
"sway_libs",
]

[[package]]
name = "merkle_examples"
source = "member"
dependencies = [
"std",
"sway_libs",
]

[[package]]
name = "metadata_docs"
source = "member"
dependencies = [
"standards",
"std",
"sway_libs",
]

[[package]]
name = "ownership_examples"
source = "member"
dependencies = [
"standards",
"std",
"sway_libs",
]

[[package]]
name = "pausable_example"
source = "member"
dependencies = [
"std",
"sway_libs",
]

[[package]]
name = "pausable_with_ownership_example"
source = "member"
dependencies = [
"std",
"sway_libs",
]

[[package]]
name = "queue_examples"
source = "member"
dependencies = [
"std",
"sway_libs",
]

[[package]]
name = "reentrancy_examples"
source = "member"
dependencies = [
"std",
"sway_libs",
]

[[package]]
name = "setting_src20_attributes"
source = "member"
dependencies = [
"standards",
"std",
"sway_libs",
]

[[package]]
name = "setting_src7_attributes"
source = "member"
dependencies = [
"standards",
"std",
"sway_libs",
]

[[package]]
name = "signed_integers_examples"
source = "member"
dependencies = [
"std",
"sway_libs",
]

[[package]]
name = "standards"
source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.5.0#348f7175df4c012b23c86cdb18aab79025ca1f18"
dependencies = ["std"]

[[package]]
name = "std"
source = "git+https://github.com/fuellabs/sway?tag=v0.60.0#2f0392ee35a1e4dd80bd8034962d5b4083dfb8b6"
dependencies = ["core"]

[[package]]
name = "supply_docs"
source = "member"
dependencies = [
"standards",
"std",
"sway_libs",
]

[[package]]
name = "sway_libs"
source = "path+from-root-9E88A97493D252A9"
dependencies = [
"standards",
"std",
]
21 changes: 21 additions & 0 deletions libs/Forc.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[[package]]
name = "core"
source = "path+from-root-E19CE48B3E858B72"

[[package]]
name = "standards"
source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.5.0#348f7175df4c012b23c86cdb18aab79025ca1f18"
dependencies = ["std"]

[[package]]
name = "std"
source = "git+https://github.com/fuellabs/sway?tag=v0.60.0#2f0392ee35a1e4dd80bd8034962d5b4083dfb8b6"
dependencies = ["core"]

[[package]]
name = "sway_libs"
source = "member"
dependencies = [
"standards",
"std",
]

0 comments on commit 3b6959b

Please sign in to comment.