Add library section #40
Workflow file for this run
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
name: Forc build all examples | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
setup_fuelup: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Install Fuelup | |
run: | | |
curl https://install.fuel.network | sh | |
- name: Modify Path | |
run: echo "$HOME/.fuelup/bin:$PATH" >> $GITHUB_PATH | |
- name: Cache Fuelup components | |
id: cache-fuelup | |
uses: actions/cache@v3 | |
with: | |
path: ~/.fuelup | |
key: ${{ runner.os }}-fuelup-${{ hashFiles('**/forc.toml') }} | |
- name: Set Fuelup environment and add component | |
run: | | |
fuelup default testnet | |
build_and_test: | |
runs-on: ubuntu-latest | |
needs: setup_fuelup | |
strategy: | |
matrix: | |
dir: [ | |
'predicate_multisig', | |
'primitive_types', | |
'tuples', | |
'control_flow_if', | |
'constants', | |
'logging', | |
'base_asset', | |
'vector', | |
'enums', | |
'structs', | |
'control_flow_while_loop', | |
'compound_types', | |
'blockchain_types', | |
'control_flow_match_statement', | |
'solidity_cheatsheet', | |
'results', | |
'configurable_constants', | |
'uniswapv2', | |
'options', | |
'account_types', | |
'hello_sway', | |
'functions', | |
'cheatsheet', | |
'storage_map', | |
'variables', | |
'math_lib' | |
'imports', | |
] | |
name: Forc build [ ${{ matrix.dir }} ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Restore Fuelup cache | |
id: restore-fuelup-cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.fuelup | |
key: ${{ runner.os }}-fuelup-${{ hashFiles('**/forc.toml') }} | |
restore-keys: | | |
${{ runner.os }}-fuelup- | |
- name: Modify Path | |
run: echo "$HOME/.fuelup/bin:$PATH" >> $GITHUB_PATH | |
- name: Build in ${{ matrix.dir }} | |
run: | | |
cd examples/${{ matrix.dir }} | |
forc build |