Skip to content

Set Julia binary in install() + add CI test for asysimg script - #17

Open
petvana wants to merge 17 commits into
mainfrom
pv/asysimg-test
Open

Set Julia binary in install() + add CI test for asysimg script#17
petvana wants to merge 17 commits into
mainfrom
pv/asysimg-test

Conversation

@petvana

@petvana petvana commented Sep 19, 2022

Copy link
Copy Markdown
Owner

This aims to test --project argument for asysimg script.

It is expected to fail on Windows now because of #7.

@petvana petvana changed the title Draft CI test for asysimg script Set Julia binary in install() + add CI test for asysimg script Sep 19, 2022
@petvana

petvana commented Sep 19, 2022

Copy link
Copy Markdown
Owner Author

@curio-sitas Can you please check this PR if it makes sense to you to set the absolute path to Julia binary in install()?

@petvana petvana linked an issue Sep 19, 2022 that may be closed by this pull request
@curio-sitas

Copy link
Copy Markdown
Contributor

@petvana It seems good to me. This way we are sure to aim the correct directories / julia executable wherever they are landed / installed.

We may also propose to add julia bin in the path if it is not the case ?

@petvana

petvana commented Sep 19, 2022

Copy link
Copy Markdown
Owner Author

@curio-sitas Thank you for your time. However, the CI fails on Windows. The problems is that is do not load the sysimage automatically when called with
--project=D:\\a\\AutoSysimages.jl\\AutoSysimages.jl\\examples\\ExampleWithPlots

I've already added %* to asysimg.bat to include all arguments, but it works only for --project.

@curio-sitas

Copy link
Copy Markdown
Contributor

I do not now much about batch but there are different ways to parse/format the argument's list. I'll be looking at that tomorow

@petvana

petvana commented Sep 19, 2022

Copy link
Copy Markdown
Owner Author

In this repo, I've used batch files for the very first time. Normally, I use bash. 😀

@curio-sitas

curio-sitas commented Sep 20, 2022

Copy link
Copy Markdown
Contributor

Try with this, the %* batch arguments are needed once but are used twice :

@echo off
set JULIA=julia.exe
for /f "tokens=1-4" %%i in ('%JULIA% -e "using AutoSysimages; print(julia_args()); exit()"') do set A=%%i %%j %%k %%l
%JULIA% %* %A%

It does work for me, only if there is a Manifest file in the Examples projects ! Before that i had an Error (OhMyREPL missing in the manifest file ...)

For example, it does work well with :

asysimg --project=C:\Users\<username>\Documents\GitHub\AutoSysimages.jl\examples\ExampleWithPlots --color=no

For what other arguments do it fail on your side ?

@petvana

petvana commented Sep 21, 2022

Copy link
Copy Markdown
Owner Author

I've updated this PR with #23 to improve the loading time. However, the last CI test still fails on Windows for some reason.

# Test if the sysimage is really loaded
@test success(`$asysimg_path "$proj" -e "using AutoSysimages; AutoSysimages.is_asysimg || exit(1);"`)

Comment thread src/AutoSysimages.jl Outdated
@petvana petvana added help wanted Extra attention is needed windows Affects only Windows labels Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed windows Affects only Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Project is not propagagted in asysimg.bat script for Windows

2 participants