Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

feat: allow specific nightly version #4

Merged
merged 4 commits into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 31 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,43 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Install Huff
run: node ./dist/index.js
- name: Install Huff nightly
uses: ./ # use huff-toolchain current commit
with:
version: nightly

- name: Install Dependencies
- name: Save huffc version in env for future comparison
run: echo "HUFF_VERSION=$(huffc -V)" >> $GITHUB_ENV

- name: Compile example
run: huffc examples/test.huff

- name: Install Huff with specific nightly
uses: ./ # use huff-toolchain current commit
with:
# This version was picked as it will output 0.3.0
# Nightly and next versions outputs >= 0.3.1
version: nightly-d4638680736ad104290bc7a28542c058a18debf4

- name: Save huffc version in env for future comparison
run: echo "HUFF_SPECIFIC_VERSION=$(huffc -V)" >> $GITHUB_ENV

# Compare huffc versions saved in GITHUB_ENV
# If they are equal, the specific nightly version was not installed
# In this case, print a message and fail the job by exiting
# Otherwise, it will continue to next step
- name: Compare version
if: ${{ env.HUFF_SPECIFIC_VERSION == env.HUFF_VERSION }}
run: |
echo "specific nightly version was not installed"
exit 1

- name: Compile example
run: huffc examples/test.huff
Loading