Skip to content

Commit

Permalink
Use setup-universal-sierra-compiler action (#1969)
Browse files Browse the repository at this point in the history
<!-- Reference any GitHub issues resolved by this PR -->

Closes #1858

## Introduced changes

<!-- A brief description of the changes -->

- Added
[`setup-universal-sierra-compiler`](https://github.com/software-mansion/setup-universal-sierra-compiler)
action

Couldn't integrate it using composite actions, sadly.

## Checklist

<!-- Make sure all of these are complete -->

- [ ] Linked relevant issue
- [ ] Updated relevant documentation
- [ ] Added relevant tests
- [ ] Performed self-review of the code
- [ ] Added changes to `CHANGELOG.md`
  • Loading branch information
tomek0123456789 authored Apr 5, 2024
1 parent e14ac36 commit adf18c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84
- uses: software-mansion/[email protected]
- name: Install universal-sierra-compiler
run: |
curl -L https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh | sh
- uses: software-mansion/setup-universal-sierra-compiler@v1
- run: cargo test --release --lib -p forge
- run: cargo test --release --bin snforge
- run: cargo test --release integration -p forge
Expand Down Expand Up @@ -58,9 +56,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84
- uses: software-mansion/[email protected]
- name: Install universal-sierra-compiler
run: |
curl -L https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh | sh
- uses: software-mansion/setup-universal-sierra-compiler@v1
- run: cargo test --release e2e -p forge

test-forge-runner:
Expand All @@ -80,9 +76,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84
- uses: software-mansion/[email protected]
- name: Install universal-sierra-compiler
run: |
curl -L https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh | sh
- uses: software-mansion/setup-universal-sierra-compiler@v1
- name: Run Cheatnet tests
run: cargo test --release -p cheatnet

Expand All @@ -100,9 +94,7 @@ jobs:
- name: Install starknet-devnet-rs
run: ./scripts/install_devnet.sh
- uses: software-mansion/[email protected]
- name: Install universal-sierra-compiler
run: |
curl -L https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh | sh
- uses: software-mansion/setup-universal-sierra-compiler@v1
- name: Run tests
run: cargo test --release -p sncast

Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,7 @@ jobs:
fi
- name: Install universal-sierra-compiler
shell: bash
run: |
if [[ ${{ matrix.target }} == *windows* ]]; then
curl -L -o udc.zip https://github.com/software-mansion/universal-sierra-compiler/releases/download/v2.0.0/universal-sierra-compiler-v2.0.0-x86_64-pc-windows-msvc.zip
unzip udc.zip
echo "UDC_PATH=$(pwd)/universal-sierra-compiler-v2.0.0-x86_64-pc-windows-msvc/bin/universal-sierra-compiler.exe" >> $GITHUB_ENV
else
curl -L https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh | sh
echo "UDC_PATH=${HOME}/.local/bin/universal-sierra-compiler" >> $GITHUB_ENV
fi
uses: software-mansion/setup-universal-sierra-compiler@v1

- name: Smoke test
shell: bash
Expand All @@ -210,7 +201,6 @@ jobs:
BINARY_PATH="${BINARY_PATH%.tar.gz}"
BINARY_PATH="${BINARY_PATH%.zip}"
BINARY_PATH="${BINARY_PATH#artifacts/}"
export UNIVERSAL_SIERRA_COMPILER="${{ env.UDC_PATH }}"
if [[ ${{ matrix.target }} == *windows* ]]; then
SNFORGE_PATH=$(readlink -f $BINARY_PATH/bin/snforge.exe)
Expand Down

0 comments on commit adf18c0

Please sign in to comment.