Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use dfinity/setup-dfx github action #708

Closed
wants to merge 2 commits into from

Conversation

ericswanson-dfinity
Copy link
Member

@ericswanson-dfinity ericswanson-dfinity commented Feb 9, 2024

Overview
This is to be compatible with dfxvm once it's released.

I also updated all of the workflows to use actions/checkout@v4. This PR is split into two commits: the first updates to actions/checkout@v4, the second updates to use dfinity/setup-dfx.

Requirements
These tests should install dfx now, and after dfxvm is released.

Considered Solutions
Another option would have been to copy the path setup from https://github.com/dfinity/setup-dfx/blob/main/action.yml into the provision scripts.

# Linux
echo "$HOME/.local/share/dfx/bin" >> $GITHUB_PATH
# Macos
echo "$HOME/Library/Application Support/org.dfinity.dfx/bin" >> $GITHUB_PATH

Recommended Solution
There's a github action now, so it seems nice to use it. Also the workflows used to use a couple different methods of overriding the dfx version. Now there's just one:

      - uses: dfinity/setup-dfx@main
        with:
          dfx-version: 0.14.2

Considerations
This should reduce maintenance costs going forward, since https://github.com/dfinity/setup-dfx should be able to perform its part.

@ericswanson-dfinity
Copy link
Member Author

Closed because this change would mean one of two things:

  • every workflow that doesn't pin the dfx version would use the latest dfx version (no reproducibility)
  • every workflow would have to pin to the latest dfx version, so using a newer dfx version would mean touching every workfloow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant