Merge pull request #63 from PumasAI/mh/custom-juliaup-channel-config #190
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, isolated-tests] | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
echo test-bundle: ${{ needs.test.result }} | |
echo isolated-tests: ${{ needs.isolated-tests.result }} | |
- run: exit 1 | |
if: | | |
(needs.test.result != 'success') || | |
(needs.isolated-tests.result != 'success') | |
test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- "1.10" | |
- "1.11" | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- uses: julia-actions/install-juliaup@1da6847c869cd68e3a32b8f52fe8f005b8cd5ece # v2.2.1 | |
with: | |
channel: "${{ matrix.version }}" | |
- uses: julia-actions/cache@824243901fb567ccb490b0d0e2483ccecde46834 # v2.0.5 | |
- uses: julia-actions/julia-buildpkg@e3eb439fad4f9aba7da2667e7510e4a46ebc46e1 # v1.7.0 | |
- uses: julia-actions/julia-runtest@1e03e0122a598a569004c1e26950e2547b350ec0 # v1.11.1 | |
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: bundle-${{ matrix.os }}-${{ matrix.version }} | |
path: test/build/LocalCustomRegistry | |
include-hidden-files: true | |
isolated-tests: | |
needs: [test] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- "1.10" | |
- "1.11" | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
bundle: | |
- bundle-macos-latest | |
- bundle-ubuntu-latest | |
- bundle-windows-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
persist-credentials: false | |
- uses: julia-actions/install-juliaup@1da6847c869cd68e3a32b8f52fe8f005b8cd5ece # v2.2.1 | |
with: | |
channel: "${{ matrix.version }}" | |
- uses: julia-actions/cache@824243901fb567ccb490b0d0e2483ccecde46834 # v2.0.5 | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: ${{ matrix.bundle }}-${{ matrix.version }} | |
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: Instantiate scripts project | |
run: julia --startup-file=no --project=test/scripts -e 'import Pkg; Pkg.instantiate()' | |
- name: Verify bundle | |
run: julia --startup-file=no --project=test/scripts test/scripts/verify.jl | |
- name: Remove bundle | |
run: julia --startup-file=no --project=test/scripts test/scripts/remove.jl | |
if: always() |