From 12ba044d605f7f8c6863d65c25f9aace6996a548 Mon Sep 17 00:00:00 2001 From: Olivier Labayle Date: Thu, 21 Dec 2023 14:59:42 +0100 Subject: [PATCH] try build in CI --- .github/workflows/CI.yml | 2 +- .gitignore | 1 + Comonicon.toml | 20 -------------------- Project.toml | 2 ++ deps/build_app.jl | 3 ++- deps/execute.jl | 7 ------- docker/Dockerfile | 5 +---- 7 files changed, 7 insertions(+), 33 deletions(-) delete mode 100644 Comonicon.toml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 19683a3..29551c4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -30,7 +30,7 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - name: Build App - run: julia --project -t auto deps/build_app.jl app tarball + run: julia --project --startup-file=no deps/build_app.jl - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v2 with: diff --git a/.gitignore b/.gitignore index 63898a4..eb170c5 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ deps/build.log deps/downloads/ deps/usr/ deps/src/ +tmle/ # Build artifacts for creating documentation generated by the Documenter package docs/build/ diff --git a/Comonicon.toml b/Comonicon.toml deleted file mode 100644 index 4acd652..0000000 --- a/Comonicon.toml +++ /dev/null @@ -1,20 +0,0 @@ -name = "tmle" - -[install] -completion = true -quiet = false -optimize = 2 - -# [sysimg] -# incremental=true -# filter_stdlibs=false - -# [sysimg.precompile] -# execution_file = ["deps/execute.jl"] - -# [application] -# incremental=true -# filter_stdlibs=false - -# [application.precompile] -# execution_file = ["deps/execute.jl"] \ No newline at end of file diff --git a/Project.toml b/Project.toml index 7575ae0..f5df5c6 100644 --- a/Project.toml +++ b/Project.toml @@ -26,6 +26,7 @@ MLJXGBoostInterface = "54119dfa-1dab-4055-a167-80440f4f7a91" Mmap = "a63ad114-7e13-5084-954f-fe012c677804" MultipleTesting = "f8716d33-7c4a-5097-896f-ce0ecbd3ef6b" Optim = "429524aa-4258-5aef-a3af-852621145aeb" +PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" TMLE = "8afdd2fb-6e73-43df-8b62-b1650cd9c8cf" @@ -33,6 +34,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" [compat] +PackageCompiler = "2.1.16" ArgParse = "1.1.4" Arrow = "2.5.2" CSV = "0.10" diff --git a/deps/build_app.jl b/deps/build_app.jl index e0a9f11..cb0b99c 100644 --- a/deps/build_app.jl +++ b/deps/build_app.jl @@ -1 +1,2 @@ -using TargetedEstimation; TargetedEstimation.comonicon_install() \ No newline at end of file +using PackageCompiler +PackageCompiler.create_app(".", "tmle", precompile_execution_file="execute.jl") diff --git a/deps/execute.jl b/deps/execute.jl index bde1b1b..70f58fe 100644 --- a/deps/execute.jl +++ b/deps/execute.jl @@ -1,13 +1,6 @@ using TargetedEstimation @info "Running precompilation script." - -# Run help messages -TargetedEstimation.command_main(["-h"]) -TargetedEstimation.command_main(["tmle", "-h"]) -TargetedEstimation.command_main(["make-summary", "-h"]) -TargetedEstimation.command_main(["sieve-variance-plateau", "-h"]) - # Run workload TEST_DIR = joinpath(pkgdir(TargetedEstimation), "test") push!(LOAD_PATH, TEST_DIR) diff --git a/docker/Dockerfile b/docker/Dockerfile index 547da61..741a9ba 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -22,8 +22,5 @@ RUN julia --project -e'using Pkg; Pkg.instantiate(); Pkg.resolve(); Pkg.precompi # Build CLI RUN julia --project --startup-file=no deps/build_app.jl -# Add CLI to PATH -ENV PATH="${PATH}:/opt/bin/" - # Test the CLI runs -RUN tmle tmle data/sample_dataset.csv \ No newline at end of file +RUN tmle/bin/tmle tmle data/sample_dataset.csv \ No newline at end of file