-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
46 lines (46 loc) · 1.8 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: 'Report Julia CI results'
description: 'Report Julia CI results'
inputs:
results-path:
type: string
required: true
lint-results:
required: false
runs:
using: "composite"
steps:
- name: Compute Manifest hash
id: project-hash
shell: pwsh
run: |
$ourHash = Get-FileHash -LiteralPath "$env:GITHUB_ACTION_PATH\Manifest.toml"
"MANIFEST_HASH=$($ourHash.Hash)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
- name: Check Julia version
shell: bash
id: julia-version
run: |
echo "JULIA_VERSION=$(julia -v)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: cache-project
with:
path: ${{ runner.tool_cache }}/julia-run-testitems-depot
key: julia-report-ci-results-cache-${{ runner.os }}-${{ steps.julia-version.outputs.JULIA_VERSION }}-${{ steps.project-hash.outputs.MANIFEST_HASH }}
- name: Install and precompile
if: steps.cache-project.outputs.cache-hit != 'true'
run: julia -e 'import Pkg; Pkg.instantiate()'
shell: bash
env:
JULIA_PROJECT: ${{ github.action_path }}
JULIA_DEPOT_PATH: ${{ runner.tool_cache }}/julia-run-testitems-depot
- uses: actions/cache/save@v4
if: steps.cache-project.outputs.cache-hit != 'true'
with:
path: ${{ runner.tool_cache }}/julia-run-testitems-depot
key: julia-report-ci-results-cache-${{ runner.os }}-${{ steps.julia-version.outputs.JULIA_VERSION }}-${{ steps.project-hash.outputs.MANIFEST_HASH }}
- name: Run test items
run: julia --project=${{ github.action_path }} ${{ github.action_path }}/main.jl
shell: pwsh
env:
JULIA_DEPOT_PATH: ${{ runner.tool_cache }}/julia-run-testitems-depot
RESULTS_PATH: ${{ inputs.results-path }}
LINT_RESULTS: ${{ inputs.lint-results }}