2023-07-16 10:23:36 +03:00
|
|
|
distributable:
|
|
|
|
# FIXME: foundry has releases named "Nightly (YYYY-MM-DD)"
|
|
|
|
# but their tags are "nightly-<sha>".
|
2024-04-12 23:46:09 +03:00
|
|
|
# url: https://github.com/foundry-rs/foundry/archive/refs/tags/{{version.tag}}.tar.gz
|
|
|
|
url: https://github.com/foundry-rs/foundry/archive/refs/tags/nightly-bdc04c278f8ac716ed5fd3994bc0da841807b5cf.tar.gz
|
2023-07-16 10:23:36 +03:00
|
|
|
strip-components: 1
|
|
|
|
versions:
|
2024-04-12 23:46:09 +03:00
|
|
|
# this would work with `version.tag`, except they're all pre-releases, which we
|
|
|
|
# ignore
|
|
|
|
# FIXME: https://github.com/pkgxdev/brewkit/issues/327
|
|
|
|
# github: foundry-rs/foundry
|
2023-07-16 10:23:36 +03:00
|
|
|
# strip:
|
|
|
|
# - /^Nightly \(/
|
|
|
|
# - /\)$/
|
2024-04-12 23:46:09 +03:00
|
|
|
- 2024.4.12
|
2023-07-16 10:23:36 +03:00
|
|
|
|
|
|
|
dependencies:
|
|
|
|
git-scm.org: ^2
|
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
2023-12-08 00:32:17 +03:00
|
|
|
rust-lang.org: ^1.74 # edition: 2021
|
2024-04-12 23:46:09 +03:00
|
|
|
rust-lang.org/cargo: '*'
|
2023-07-16 10:23:36 +03:00
|
|
|
script:
|
2023-12-08 00:32:17 +03:00
|
|
|
# install Forge
|
|
|
|
- cargo install --path ./crates/forge $ARGS
|
|
|
|
# install Cast
|
|
|
|
- cargo install --path ./crates/cast $ARGS
|
|
|
|
# install Anvil
|
|
|
|
- cargo install --path ./crates/anvil $ARGS
|
|
|
|
# install Chisel
|
|
|
|
- cargo install --path ./crates/chisel $ARGS
|
|
|
|
|
2023-07-16 10:23:36 +03:00
|
|
|
env:
|
|
|
|
ARGS:
|
|
|
|
- --root "{{prefix}}"
|
|
|
|
- --profile local
|
|
|
|
- --force
|
|
|
|
- --locked
|
|
|
|
|
|
|
|
provides:
|
|
|
|
- bin/forge
|
|
|
|
- bin/anvil
|
|
|
|
- bin/cast
|
|
|
|
- bin/chisel
|
|
|
|
|
|
|
|
test:
|
|
|
|
script:
|
|
|
|
# forge uses git which has minimum config requirements.
|
|
|
|
- |
|
2023-12-08 00:32:17 +03:00
|
|
|
git init
|
2024-04-12 23:46:09 +03:00
|
|
|
git config user.email "hello@pkgx.dev"
|
|
|
|
git config user.name "pkgx"
|
2023-07-16 10:23:36 +03:00
|
|
|
# And forge init requires a clean git repo.
|
|
|
|
- |
|
2024-04-12 23:46:09 +03:00
|
|
|
touch README.md
|
2023-12-08 00:32:17 +03:00
|
|
|
git add -A
|
|
|
|
git commit -m "Initial commit"
|
2023-07-16 10:23:36 +03:00
|
|
|
- forge init hello_foundry
|
|
|
|
- run: forge build && forge test
|
|
|
|
working-directory: hello_foundry
|