-
Notifications
You must be signed in to change notification settings - Fork 497
Build Julia HTML manual in regression tests #2724
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
base: master
Are you sure you want to change the base?
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.
Some unqualified remarks from the sidelines, please feel free to ignore. Of course overall this seems like a good idea
# the current Documenter, acting as a regression test. | ||
|
||
# Terminate the script early if we see any non-zero error codes | ||
set -e |
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.
You do you of course, but if I may add my two cents: while I also tend to automatically write such things in shell scripts, these days I try to ask myself "why not write this in Julia" ;-). So many edge cases vanish...
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.
Actually, I think this is a very fair point, and I also generally tend follow that philosophy. I think what just happened here was that at first I was like "this should be like 3 shell commands", but then the complexity silently crept in 😄
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.
Hehe I have been in exactly that situation soooo many times ;-)
set -e | ||
|
||
# Location if this bash script | ||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) |
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.
trivial in julia... :-)
# Terminate the script early if we see any non-zero error codes | ||
set -e | ||
|
||
# Location if this bash script |
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.
# Location if this bash script | |
# Location of this bash script |
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
DOCUMENTER_SRC=$(dirname $(dirname "$SCRIPT_DIR")) | ||
|
||
# Figure out the Julia binary we use. This can be passed on the command line, but |
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.
should be trivial if this script was just run in Julia?
TMP=$(mktemp -d) | ||
cd "$TMP" | ||
echo "Running in: $PWD" | ||
# .. which we also want to clean up when the script exits | ||
trap "rm -r $TMP" EXIT |
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.
mktempdir() do tmpdir
cd(tmpdir)
run(`git clone ...`)
end
${{ runner.os }}-test- | ||
${{ runner.os }}- | ||
- name: "Regressions test" | ||
run: ./.github/scripts/julia-manual-regression-test.sh |
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.
run: ./.github/scripts/julia-manual-regression-test.sh | |
run: julia ./.github/scripts/julia-manual-regression-test.jl |
- uses: actions/cache@v4 | ||
env: | ||
cache-name: cache-artifacts | ||
with: | ||
path: ~/.julia/artifacts | ||
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} | ||
restore-keys: | | ||
${{ runner.os }}-test-${{ env.cache-name }}- | ||
${{ runner.os }}-test- | ||
${{ runner.os }}- |
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.
Can't this just use julia-actions/cache
?
- uses: actions/cache@v4 | |
env: | |
cache-name: cache-artifacts | |
with: | |
path: ~/.julia/artifacts | |
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} | |
restore-keys: | | |
${{ runner.os }}-test-${{ env.cache-name }}- | |
${{ runner.os }}-test- | |
${{ runner.os }}- | |
- uses: julia-actions/cache@v2 |
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.
This makes sense. I think we should update the other places in the regression tests workflow too.
No description provided.