From 3a704052c6b59f3521eb66fd8400fd26e4c5b405 Mon Sep 17 00:00:00 2001 From: Benjamin Lorenz Date: Sun, 17 Mar 2024 09:21:21 +0100 Subject: [PATCH 1/2] ca-cert: use NetworkOptions instead of jll --- Project.toml | 4 ++-- src/polydb.jl | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index 84b5fbe6..bc286b1a 100644 --- a/Project.toml +++ b/Project.toml @@ -10,7 +10,7 @@ Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" Mongoc = "4fe8b98c-fc19-5c23-8ec2-168ff83495f2" -MozillaCACerts_jll = "14a3606d-f60d-562e-9121-12d972cd8159" +NetworkOptions = "ca575930-c2e3-43a9-ace4-1e988b2c1908" Ninja_jll = "76642167-d241-5cee-8c94-7a494e8cb7b7" Perl_jll = "83958c19-0796-5285-893e-a1267f8ec499" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" @@ -30,7 +30,7 @@ Downloads = "^1.4" JSON = "^0.20, ^0.21" Libdl = "^1.6" Mongoc = "~0.6.0, ~0.7.0, ~0.8.0, ~0.9.0" -MozillaCACerts_jll = "2020 - 2024" +NetworkOptions = "1.2" Ninja_jll = "^1.11.1" Perl_jll = "^5.34.0" Pkg = "^1.6" diff --git a/src/polydb.jl b/src/polydb.jl index b1e8dc4c..e1ca1e89 100644 --- a/src/polydb.jl +++ b/src/polydb.jl @@ -1,10 +1,9 @@ module Polydb -using Polymake +using ..Polymake -# julia itself also has a cert.pem but this one should be more recent -# and provides a variable for the path -using MozillaCACerts_jll +# for ca certificates +import NetworkOptions import Mongoc @@ -62,7 +61,7 @@ Polymake.Polydb.Database """ function get_db() # we explicitly set the cacert file, otherwise we might get connection errors because the certificate cannot be validated - client = Mongoc.Client(get(ENV, "POLYDB_TEST_URI", "mongodb://polymake:database@db.polymake.org/?authSource=admin&ssl=true&sslCertificateAuthorityFile=$(MozillaCACerts_jll.cacert)")) + client = Mongoc.Client(get(ENV, "POLYDB_TEST_URI", "mongodb://polymake:database@db.polymake.org/?authSource=admin&ssl=true&sslCertificateAuthorityFile=$(NetworkOptions.ca_roots_path())")) return Database(client["polydb"]) end From 2fc20bea514d4dcd00f88b63562781804d9b0c88 Mon Sep 17 00:00:00 2001 From: Benjamin Lorenz Date: Mon, 25 Mar 2024 16:44:27 +0100 Subject: [PATCH 2/2] CI: try excluding scratchspaces from cache --- .github/workflows/runtests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/runtests.yml b/.github/workflows/runtests.yml index b8286abf..ac415e57 100644 --- a/.github/workflows/runtests.yml +++ b/.github/workflows/runtests.yml @@ -64,6 +64,7 @@ jobs: with: cache-name: julia-cache;workflow=${{ github.workflow }};julia=${{ matrix.julia-version }};arch=${{ runner.arch }} include-matrix: false + cache-scratchspaces: false - name: "pin CxxWrap" if: matrix.cxxwrap != '' run: julia --project -e 'using Pkg; pkg"add CxxWrap@${{ matrix.cxxwrap }}"; pkg"pin CxxWrap";' @@ -112,6 +113,7 @@ jobs: with: cache-name: julia-cache;workflow=${{ github.workflow }};julia=${{ matrix.julia-version }};arch=${{ runner.arch }} include-matrix: false + cache-scratchspaces: false - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v4