-
Notifications
You must be signed in to change notification settings - Fork 3
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 build script for releases #169
Comments
@ehennestad: one thing discussed in the overview by @bpancras at the recent "campfire chat" was the build tool. |
Yes, this should be straight-forward. A couple of questions: Also, maybe more important. I wanted to export a live script using a GitHub action, but got the following error:
The workflow runs on Any ideas if that would be possible? |
I'll see what I can learn re the issue. Can you share more about the use case for export here? Since the live script is rendered & runnable, I generally imagine export as nonessential for the class of lightweight projects (which I'd argue this currently still falls under). |
Export of live scripts to html or markdown is nice for displaying the live script on a documentation page. For the bot, it could be nice to export to markdown and add to the github wiki. At the moment they are acessible on FEX but it seems that its not possible to link to them. Having automatic re-export as part of a github actions workflow simplifies development, making sure the livescript in the documentation is always up to date |
Thanks @ehennestad for elaborating. That's what I guessed the application would be! Generally my opinion is: a build script seems heavyweight solely for the purpose of making live scripts viewable/linkable. Wrt the File Exchange rendered versions, they are linkable in my hands, by using "Copy Link Address" from the browser. Can you see this on a second look? That said, I recognize this is not elegant, and it's only sensible to update this link on the README at release versions, not at every commit. Given that there are other reasons for the build script (as listed above), I'm good with exporting to MD and/or HTML as an additional benefit: stable links for each of the rendered examples. |
Just out of curiosity, heavyweight in what sense?
Yes I see it now:) Then I would suggest to update the links for the FileExchange badges in the readme tables to point directly to the tutorials and not the main FileExchange page for the BOT |
I encourage that update!
There's a class of user for whom GitHub is second nature but GitHub Actions is next level. I'm a bit queasy if rendering (which FX provides) is the reason they have to go through that transition. Imagine the experimental scientist (not a toolbox author) publishing the code for their figure publication on GitHub as part of an open science practice. I'd like to encourage them to use a live script to make it expository, without requiring them to learn/use GitHub Actions to make it broadly visible. |
Regarding exporting live scripts in GitHub Actions: The You can set up a virtual display on GitHub-hosted Linux runners by using Xvfb display server to enable functions like name: Use Virtual Display on Linux Runner
on: [push]
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Start virtual display server
if: runner.os == 'Linux'
run: |
sudo apt-get install -y xvfb
Xvfb :99 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
- name: Run MATLAB
uses: matlab-actions/run-command@v2
with:
command: export("sample.mlx"); |
Thanks @mcafaro! I have managed to get this far, but the next problem I have is the following error: I have tried to also add this to the workflow:
It does not work, but I am not 100% on top of whether I am installing the right Java distribution, and I also suspect I might have to set some environment variables |
@ehennestad Can you link me to the full workflow YAML and the job log with the error? |
For the record, the solution posted above works, but I had not set the "DISPLAY" environment variable correctly. It is important that "DISPLAY" is set before the |
Ty @ehennestad for the update and the insight into a subtle failure mode. Please keep world posted (e.g., on this Issue) if you get a build script going. This would be a good story to share with the campfire cohort. |
Suggest to add a build script using the build tool which covers the following steps:
The text was updated successfully, but these errors were encountered: