Skip to content

Test installing bundles cross-platform #16

Test installing bundles cross-platform

Test installing bundles cross-platform #16

Workflow file for this run

name: CI
on:
merge_group:
pull_request:
push:
branches:
- main
tags:
- "*"
concurrency:
# Skip intermediate builds: all builds except for builds on the `master` branch
# Cancel intermediate builds: only pull request builds
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
permissions:
actions: write
contents: read
jobs:
finalize:
timeout-minutes: 10
needs: [test-bundle]
if: always()
runs-on: ubuntu-latest
steps:
- run: |
echo test: ${{ needs.test-bundle.result }}
- run: exit 1
if: |
(needs.test-bundle.result != 'success')
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version:
- "1.10"
os:
- macos-latest
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
persist-credentials: false
- uses: julia-actions/setup-julia@a1561e938c17e7aaf8236334d6d533e774c71dcd
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@dc1a3cdeacb521b0ca93cfc66143fcadb15a5bd0
- uses: julia-actions/julia-buildpkg@90dd6f23eb49626e4e6612cb9d64d456f86e6a1c
- uses: julia-actions/julia-runtest@79a7e100883947123f8263c5f06e6c0ea3eb972f
- run: mv test/build/LocalCustomRegistry test/build/LocalCustomRegistry-${{ matrix.os }}
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
name: bundle-${{ matrix.os }}
path: test/build/LocalCustomRegistry-${{ matrix.os }}
test-bundle:
needs: [test]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version:
- "1.10"
os:
- macos-latest
- ubuntu-latest
- windows-latest
bundle:
- bundle-macos-latest
- bundle-ubuntu-latest
- bundle-windows-latest
steps:
- uses: julia-actions/setup-julia@a1561e938c17e7aaf8236334d6d533e774c71dcd
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@dc1a3cdeacb521b0ca93cfc66143fcadb15a5bd0
- uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe
with:
name: ${{ matrix.bundle }}
path: ${{ matrix.bundle }}
- name: Initialize Julia Depot
run: julia -e 'import Pkg; Pkg.status()'
- name: Install bundle
run: julia ${{ matrix.bundle }}/registry/install.jl
- name: Installing the same bundle again should uninstall and reinstall
run: julia ${{ matrix.bundle }}/registry/install.jl
- name: Resolve environment and precompile
run: |
julia --project=@CustomEnv -e '
pushfirst!(LOAD_PATH, "@stdlib")
import Pkg
Pkg.status()
Pkg.resolve()
Pkg.precompile("CairoMakie")
'
- name: Load packages
run: julia --project=@CustomEnv -e 'import CairoMakie'
- name: Remove bundle
run: |
julia -e '
for depot in DEPOT_PATH
path = joinpath(depot, "registries", "LocalCustomRegistry", "remove.jl")
if isfile(path)
run(`julia $path`)
break
end
end
'