Skip to content

Commit

Permalink
test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHatherly committed Apr 5, 2024
1 parent 53d2076 commit 561bc5e
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 8 deletions.
73 changes: 68 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# if: |
# (needs.test-bundle.result != 'success')

multiversion-build:
build-multiversion:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
Expand All @@ -48,19 +48,82 @@ jobs:
- run: julia --project=test/multiversion/envs/CommonMark_1.10.1 -e 'import Pkg; Pkg.instantiate()'
env:
ASDF_JULIA_VERSION: "1.10.1"
JULIA_PKG_PRECOMPILE_AUTO: "0"

- run: julia --project=test/multiversion/envs/CommonMark_1.10.2 -e 'import Pkg; Pkg.instantiate()'
env:
ASDF_JULIA_VERSION: "1.10.2"

- run: julia --project -e 'import Pkg; Pkg.instantiate()'
env:
ASDF_JULIA_VERSION: "1.10.2"
JULIA_PKG_PRECOMPILE_AUTO: "0"

- run: asdf global julia 1.10.2

- run: julia --project -e 'import Pkg; Pkg.instantiate()'
- run: julia --project test/multiversion/bundle.jl

- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: multiversion
path: test/multiversion/build/CommonMarkStrippedRegistry

test-multiversion:
needs: [build-multiversion]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
version:
- "1.10.1"
- "1.10.2"
os:
- macos-latest
- ubuntu-latest
- windows-latest

steps:
- uses: julia-actions/setup-julia@f2258781c657ad9b4b88072c5eeaf9ec8c370874
with:
version: ${{ matrix.version }}

- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427
with:
name: multiversion
path: multiversion

- name: Initialize Julia Depot
run: julia -e 'import Pkg; Pkg.status()'

- name: Install bundle
run: julia multiversion/registry/install.jl

- name: Installing the same bundle again should uninstall and reinstall
run: julia multiversion/registry/install.jl

- name: Resolve environment and precompile
run: |
julia --project=@CommonMark_${{ matrix.version }} -e '
pushfirst!(LOAD_PATH, "@stdlib")
import Pkg
Pkg.status()
Pkg.resolve()
Pkg.precompile("CommonMark")
'
- name: Load stripped package
run: julia --project=@CommonMark_${{ matrix.version }} -e 'import CommonMark'

- name: Remove bundle
run: |
julia -e '
for depot in DEPOT_PATH
path = joinpath(depot, "registries", "CommonMarkStrippedRegistry", "remove.jl")
if isfile(path)
run(`julia $path`)
break
end
end
'
# test:
# runs-on: ${{ matrix.os }}
# timeout-minutes: 60
Expand Down
6 changes: 3 additions & 3 deletions test/multiversion/PackageBundler.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name = "CommonMarkStrippedRegistry"
uuid = "a0e467e0-faf1-11e4-9d3f-2f4b262e6b06"
environments = [
"envs/CommonMark_1.10.2",
"envs/CommonMark_1.10.1"
"envs/CommonMark_1.10.1",
"envs/CommonMark_1.10.2"
]
outputs = ["build/LocalCustomRegistry"]
outputs = ["build/CommonMarkStrippedRegistry"]
key = "key"
clean = true
multiplexers = ["asdf", "juliaup"]
Expand Down

0 comments on commit 561bc5e

Please sign in to comment.