forked from FuelLabs/sway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename core_lang to core-lang, core-types to sway-types, and update d…
…ependencies to use crates.io (FuelLabs#486) * Rename core_lang to core-lang * update workspace to sway-types * Rename * update readme * add verifys cript * update ci * update some names * fix * rename formatter to sway-fmt * rename core-lang to sway-core * specify version for sway fmt * Prevent publishing. * add sway server to check * alpha * Update manifest files. * Remove duplicate core types. * update test harness; use crates.io for fuel-client * formatting * forgotten add * update fuel-core test * run fuel-core in the background * update README * kill fuel-core after use * yaml tweak Co-authored-by: John Adler <[email protected]>
- Loading branch information
Showing
142 changed files
with
320 additions
and
263 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
core_lang/ @sezna | ||
sway-core/ @sezna | ||
forc/ @sezna | ||
formatter/ @leviathanbeak | ||
sway-fmt/ @leviathanbeak | ||
docs/ @adlerjohn @sezna | ||
fuel-abi-cli/ @digorithm | ||
fuels-abigen-macro/ @digorithm | ||
fuels-rs/ @digorithm | ||
lib-std/ @sezna | ||
lib-core/ @sezna | ||
test/ @sezna | ||
core-types/ @leviathanbeak | ||
sway-types/ @sezna | ||
scripts/ @leviathanbeak |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Install rustfmt | ||
run: rustup component add rustfmt | ||
|
||
- name: Set git config | ||
run: | | ||
git config --global core.bigfilethreshold 500m | ||
- name: Check formatting | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
- name: Install fuel-core | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
# We use debug here to reduce build time, since the performance difference | ||
# is minimal between release and debug builds for the purposes of these tests. | ||
args: --debug fuel-core | ||
|
||
- name: Run fuel-core | ||
run: | | ||
fuel-core & | ||
echo $! > ./fuel-core.pid | ||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
|
||
- name: Run tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: run | ||
args: --release --bin test | ||
|
||
- name: Kill fuel-core | ||
run: cat ./fuel-core.pid | xargs kill | ||
|
||
|
||
publish: | ||
# Only do this job if publishing a release | ||
needs: build | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Verify tag version | ||
run: | | ||
cargo install toml-cli | ||
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} forc/Cargo.toml | ||
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} sway-core/Cargo.toml | ||
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} sway-fmt/Cargo.toml | ||
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} sway-server/Cargo.toml | ||
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} sway-types/Cargo.toml | ||
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} sway-utils/Cargo.toml | ||
- name: Publish crate | ||
uses: katyo/publish-crates@v1 | ||
with: | ||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
err() { | ||
echo -e "\e[31m\e[1merror:\e[0m $@" 1>&2; | ||
} | ||
|
||
status() { | ||
WIDTH=12 | ||
printf "\e[32m\e[1m%${WIDTH}s\e[0m %s\n" "$1" "$2" | ||
} | ||
|
||
REF=$1 | ||
MANIFEST=$2 | ||
|
||
if [ -z "$REF" ]; then | ||
err "Expected ref to be set" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$MANIFEST" ]; then | ||
err "Expected manifest to be set" | ||
exit 1 | ||
fi | ||
|
||
# strip preceeding 'v' if it exists on tag | ||
REF=${REF/#v} | ||
TOML_VERSION=$(toml get $MANIFEST package.version | tr -d '"') | ||
|
||
if [ "$TOML_VERSION" != "$REF" ]; then | ||
err "Crate version $TOML_VERSION, doesn't match tag version $REF" | ||
exit 1 | ||
else | ||
status "Crate version matches tag $TOML_VERSION" | ||
fi |
Oops, something went wrong.