-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add prefix input #24
Add prefix input #24
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but as you mention in your post, it would be good to see a successful real-world build before merging.
This allows inserting commands like xvfb-run in front of the Julia command (fixes #3)
Codecov Report
@@ Coverage Diff @@
## master #24 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 2 2
=========================================
Hits 2 2 Continue to review full report at Codecov.
|
I have a use-case in timholy/ProfileView.jl#161. It's not working ATM, but happy to be a guinea pig. At the moment it fails on /home/runner/work/_temp/9e3ae815-3fa0-4631-b50e-28e7dfe4bff2.sh: line 4: xvfb-run julia: command not found and it breaks macOS and windows. How should we support conditional prefixes? |
Looks like bash treats
While it adds some initial burden to the user, I feel like handling this on the workflow level might be the way to go. Either via a different build matrix: strategy:
matrix:
julia-version: ['1.0', '1.2.0', '^1.3.0-rc1']
os: [windows-latest, macOS-latest]
include:
- os: ubuntu-latest
julia-version: ['1']
prefix: 'xvfb-run' or via an additional step that determines the prefix: steps:
- uses: actions/checkout@v2
...
- id: prefix_check
run: [ "${{ runner.os }}" == "Linux" ] && echo "::set-output name=prefix::xvfb-run"
...
with:
prefix: ${{ steps.prefix_check.outputs.prefix }} (I much prefer the first option) |
Co-authored-by: Isaac Good <github@isaacgood.com>
Co-authored-by: Isaac Good <github@isaacgood.com>
I think 3dc8da1 fixes it, could you re-run the build to check? |
Hmm, the prefix seems to be applied to the ones not in the |
Turns out this adds double quotes if the workflow file contains quotes, which is sometimes necessary. This reverts commit 09fceda.
The - uses: julia-actions/julia-runtest@prefix
with:
prefix: ${{ matrix.prefix }} I forgot about that in the example above, sorry. Turns out there's also a better way to add additional values to certain matrix combinations: matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
version: ['1.0', '1', 'nightly']
arch: [x64]
include:
- os: ubuntu-latest
prefix: xvfb-run This will use the standard build matrix, so you don't have to define the versions twice, but add the I've ran a test build on a fork of your repo and it seems to work? There's a failure on macOS but I'm not sure if that's related: SaschaMann/ProfileView.jl#1 (CI build). However, I don't know the project so I can't tell if it behaves as it should. You can copy or cherry-pick this commit to your repo to apply the changes above: SaschaMann/ProfileView.jl@27fb312 If you could verify that it indeed works, I'll merge this PR, tag a release and you can change |
It'd be nice to have the same for |
Seems to work just fine! Looks like @giordano has used it successfully for Gtk, too. Thanks for all your help, @SaschaMann. |
@SaschaMann Good to merge now? |
Thanks for testing! I've tagged a release, it's now available via |
This allows inserting commands like xvfb-run in front of the Julia command
(fixes #3)
I don't know how xvfb-run works, this implements the solution from #3. I'd appreciate it if someone who needs this feature could do a test build to verify that it works. (Change
uses: julia-actions/julia-runtest@v1
touses: julia-actions/julia-runtest@prefix
on a branch of your project to do that).(cc @colinxs)