Skip to content

Commit

Permalink
Add support for keygen commands and some internal refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
cr-fuel committed Sep 30, 2023
1 parent 994b1c4 commit c51eb87
Show file tree
Hide file tree
Showing 12 changed files with 740 additions and 143 deletions.
64 changes: 36 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
- name: Run mdbook build
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.25'
mdbook-version: "0.4.25"
- name: Emit book logs to tmp.txt, fail if build logs contain 'ERROR'
run: |
MDBOOK_preprocessor__FORC_documenter__STRICT="true" mdbook build docs/book &> tmp.txt
Expand Down Expand Up @@ -204,10 +204,14 @@ jobs:
with:
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
- name: 'Build Workspace'
- name: Install Protoc
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
- name: "Build Workspace"
run: cargo build --locked --workspace --all-features --all-targets
env:
RUSTFLAGS: '-D warnings'
RUSTFLAGS: "-D warnings"

cargo-clippy:
runs-on: ubuntu-latest
Expand All @@ -234,7 +238,7 @@ jobs:
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-toml-lint
version: '0.1'
version: "0.1"
- name: Run Cargo.toml linter
run: git ls-files | grep Cargo.toml$ | grep -v 'templates/sway-test-rs' | xargs --verbose -n 1 cargo-toml-lint

Expand Down Expand Up @@ -339,8 +343,8 @@ jobs:
run: ./benchmark.sh --prepare-for-commit
- uses: EndBug/add-and-commit@v9
with:
cwd: './performance-data'
message: 'Updated benchmark data'
cwd: "./performance-data"
message: "Updated benchmark data"
default_author: github_actions

forc-unit-tests:
Expand Down Expand Up @@ -396,6 +400,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Protoc
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
Expand Down Expand Up @@ -443,10 +451,10 @@ jobs:
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>'
footer: ''
notify_when: 'failure'
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>"
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NOTIFY_BUILD }}

Expand Down Expand Up @@ -494,10 +502,10 @@ jobs:
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>'
footer: ''
notify_when: 'failure'
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>"
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NOTIFY_BUILD }}

Expand Down Expand Up @@ -543,10 +551,10 @@ jobs:
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>'
footer: ''
notify_when: 'failure'
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>"
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NOTIFY_BUILD }}

Expand Down Expand Up @@ -619,10 +627,10 @@ jobs:
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>'
footer: ''
notify_when: 'failure'
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>"
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NOTIFY_BUILD }}

Expand Down Expand Up @@ -674,10 +682,10 @@ jobs:
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>'
footer: ''
notify_when: 'failure'
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>"
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NOTIFY_BUILD }}

Expand Down Expand Up @@ -722,13 +730,13 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
key: '${{ matrix.job.target }}'
key: "${{ matrix.job.target }}"

- name: Use Cross
uses: baptiste0928/cargo-install@v1
with:
crate: cross
cache-key: '${{ matrix.job.target }}'
cache-key: "${{ matrix.job.target }}"

- name: Build forc binaries
run: |
Expand Down
Loading

0 comments on commit c51eb87

Please sign in to comment.