-
Notifications
You must be signed in to change notification settings - Fork 1
113 lines (99 loc) · 3.54 KB
/
runner.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# save as .github/workflows/runner.yml
name: runner
on:
workflow_call:
inputs:
os:
description: Operating System to run on
required: false
default: ubuntu
type: string
os_version:
description: OS version
required: false
default: latest
type: string
raku_version:
description: Raku version latest or 2023.10, etc.
required: false
default: latest
type: string
verbosity:
description: verbosity
required: false
default: error
type: string
skip_deps_tests:
description: skip dependency tests
required: false
default: false
type: boolean
run_prove6:
description: run prove6
required: false
default: false
type: boolean
run_tests_script:
description: run-tests.raku
required: false
default: false
type: boolean
install_module:
description: install module
required: false
default: true
type: boolean
ad_hoc_pre_command:
description: ad-hoc-pre command
required: false
type: string
ad_hoc_post_command:
description: ad-hoc-post command
required: false
type: string
env:
zef_fetch_degree: 4
zef_test_degree: 2
# saving a few characters on the default C:\Users\RUNNER~1\AppData\Local\Temp trying to avoid the 260 chars
# max path length limit of Windows
# https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation
TMP: ${{ inputs.os == 'windows' && 'D:\T' || '/tmp' }}
ZEF_CONFIG_TEMPDIR: ${{ inputs.os == 'windows' && 'D:\T' || '/tmp' }}
TEMP: ${{ inputs.os == 'windows' && 'D:\T' || '/tmp' }}
jobs:
runner:
runs-on: ${{ inputs.os }}-${{ inputs.os_version }}
steps:
- name: Windows LongPathsEnabled
if: ${{ inputs.os == 'windows' }}
run: |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
mkdir -Force "${{ env.ZEF_CONFIG_TEMPDIR }}"
- uses: Raku/setup-raku@v1
with:
raku-version: ${{ inputs.raku_version }}
- uses: actions/checkout@v4
- name: Ad-hoc pre command
if: ${{ inputs.ad_hoc_pre_command }}
run: ${{ inputs.ad_hoc_pre_command }}
- name: Install Dependencies
if: ${{ ! inputs.skip_deps_tests }}
run: zef --${{ inputs.verbosity }} --deps-only --fetch-degree=${{ env.zef_fetch_degree }} --test-degree=${{ env.zef_test_degree }} install .
- name: Install Dependencies quick and dirty - skip tests
if: ${{ inputs.skip_deps_tests }}
run: zef --${{ inputs.verbosity }} --deps-only --/test --fetch-degree=${{ env.zef_fetch_degree }} install .
- name: Install Module
if: ${{ inputs.install_module }}
run: zef --${{ inputs.verbosity }} --/depends --fetch-degree=${{ env.zef_fetch_degree }} --test-degree=${{ env.zef_test_degree }} install .
- name: Run run-tests.raku
if: ${{ inputs.run_tests_script }}
run: raku -- run-tests.raku --author=True
- name: Run prove6
if: ${{ inputs.run_prove6 }}
run: |
zef install --/test --fetch-degree=${{ env.zef_fetch_degree }} --test-degree=${{ env.zef_test_degree }} App::Prove6
prove6 --version
prove6 --jobs ${{ env.zef_test_degree }} --lib --timer --verbose
- name: Ad-hoc post command
if: ${{ inputs.ad_hoc_post_command }}
run: ${{ inputs.ad_hoc_post_command }}