Skip to content

Commit 04d8b5c

Browse files
committed
Halo, dunia?
0 parents  commit 04d8b5c

19 files changed

Lines changed: 1308 additions & 0 deletions

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: sanko # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/ci.yml

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
---
2+
jobs:
3+
etc:
4+
name: 'FreeBSD/v${{matrix.perl}}'
5+
needs:
6+
- setup
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os:
11+
- architecture: x86-64
12+
host: ubuntu-latest
13+
name: freebsd
14+
pkg: pkg install -y
15+
version: 14.1
16+
- architecture: arm64
17+
host: ubuntu-latest
18+
name: freebsd
19+
pkg: pkg install -y
20+
version: 14.1
21+
perl:
22+
- "5.40"
23+
max-parallel: 5
24+
uses: ./.github/workflows/cross.yml
25+
with:
26+
arch: '${{ matrix.os.architecture }}'
27+
host: '${{ matrix.os.host }}'
28+
os: '${{ matrix.os.name }}'
29+
perl: '${{ matrix.perl }}'
30+
pkg: '${{ matrix.os.pkg }}'
31+
version: '${{ matrix.os.version }}'
32+
setup: '${{ matrix.os.setup }}'
33+
linux:
34+
name: 'Linux/v${{matrix.perl}}'
35+
needs:
36+
- setup
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
flags:
41+
- ''
42+
- -Dusethreads
43+
- -Duselongdouble
44+
- -Dusequadmath
45+
os:
46+
- ubuntu-24.04
47+
perl: '${{ fromJSON(needs.setup.outputs.matrix).perl }}'
48+
max-parallel: 25
49+
uses: ./.github/workflows/unix.yml
50+
with:
51+
flags: '${{ matrix.flags }}'
52+
os: '${{ matrix.os }}'
53+
perl: '${{ matrix.perl }}'
54+
macos:
55+
name: "[${{ matrix.os == 'macos-15-intel' && 'Intel' || 'M1' }}] macOS/v${{matrix.perl}}"
56+
needs:
57+
- setup
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
exclude:
62+
- flags: -Dusequadmath
63+
- flags: -Dusethreads
64+
flags: '${{ fromJSON(needs.setup.outputs.matrix).flags }}'
65+
os:
66+
- macos-15-intel
67+
- macos-15
68+
perl: '${{ fromJSON(needs.setup.outputs.matrix).perl }}'
69+
max-parallel: 25
70+
uses: ./.github/workflows/unix.yml
71+
with:
72+
flags: '${{ matrix.flags }}'
73+
os: '${{ matrix.os }}'
74+
perl: '${{ matrix.perl }}'
75+
results:
76+
name: Results
77+
needs:
78+
- macos
79+
- win32
80+
- linux
81+
runs-on: ubuntu-22.04
82+
steps:
83+
- name: Download test results
84+
uses: actions/download-artifact@v4
85+
with:
86+
path: artifacts
87+
- name: Report test results
88+
run: |
89+
# Function to process a directory
90+
process_dir() {
91+
local dir="$1"
92+
# Loop through each element in the directory
93+
for file in "$dir"/*; do
94+
# Check if it's a directory
95+
if [ -d "$file" ]; then
96+
# Recursively call process_dir for subdirectories (except .)
97+
if [ "$file" != "." ]; then
98+
process_dir "$file"
99+
fi
100+
# If it's a regular file, print its content
101+
elif [ -f "$file" ]; then
102+
echo "================> $file <================"
103+
cat "$file"
104+
echo "" # Add an empty line between files
105+
fi
106+
done
107+
}
108+
# Get the directory path from the first argument (or current directory)
109+
dir=${1:-.}
110+
# Process the specified directory
111+
process_dir "artifacts"
112+
setup:
113+
name: Generate Testing Matrix
114+
outputs:
115+
matrix: '${{ steps.matrix.outputs.matrix }}'
116+
runs-on: ubuntu-22.04
117+
steps:
118+
- env:
119+
DATA: |
120+
{
121+
"perl": ["5.42.0"],
122+
"flags": ["", "-Dusethreads", "-Duselongdouble", "-Dusequadmath"]
123+
}
124+
id: matrix
125+
run: "jq -rn 'env.DATA | fromjson | @json \"matrix=\\(.)\"' > $GITHUB_OUTPUT\n"
126+
win32:
127+
name: 'Windows/v${{matrix.perl}}'
128+
needs:
129+
- setup
130+
strategy:
131+
fail-fast: false
132+
matrix:
133+
exclude:
134+
- flags: -Duselongdouble
135+
- flags: -Dusequadmath
136+
flags:
137+
- -Dusethreads
138+
- ''
139+
os:
140+
- windows-2022
141+
perl: '${{ fromJSON(needs.setup.outputs.matrix).perl }}'
142+
max-parallel: 25
143+
uses: ./.github/workflows/win32.yml
144+
with:
145+
flags: '${{ matrix.flags }}'
146+
os: '${{ matrix.os }}'
147+
perl: '${{ matrix.perl }}'
148+
149+
name: CI Matrix
150+
151+
on:
152+
pull_request: ~
153+
push: ~
154+
schedule:
155+
- cron: 42 5 * * 0
156+
workflow_dispatch: ~
157+
158+
permissions:
159+
contents: read
160+
# actions: read is required to list artifacts via the API
161+
actions: read
162+

.github/workflows/cross.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
jobs:
3+
build:
4+
name: "[${{ inputs.arch }}] ${{ inputs.os == 'freebsd' && 'FreeBSD' || inputs.os == 'openbsd' && 'OpenBSD' || inputs.os }} ${{ inputs.version }}"
5+
runs-on: '${{ inputs.host }}'
6+
steps:
7+
- uses: actions/checkout@v5.0.0
8+
with:
9+
submodules: true
10+
- env:
11+
AUTHOR_TESTING: 0
12+
AUTOMATED_TESTING: 1
13+
name: 'Test on ${{ inputs.os }}'
14+
uses: cross-platform-actions/action@v0.32.0
15+
with:
16+
architecture: '${{ inputs.arch }}'
17+
cpu_count: 4
18+
environment_variables: AUTHOR_TESTING AUTOMATED_TESTING
19+
memory: 5G
20+
operating_system: '${{ inputs.os }}'
21+
run: |
22+
uname -a
23+
echo $SHELL
24+
pwd
25+
ls -lah
26+
whoami
27+
env | sort
28+
${{ inputs.setup }}
29+
sudo ${{inputs.pkg}} perl5
30+
perl -v
31+
curl -L https://cpanmin.us | sudo perl - --notest App::cpanminus Module::Build::Tiny
32+
sudo cpanm --installdeps --notest .
33+
sudo cpanm --test-only -v .
34+
command1_exit_code=$?
35+
# Check if the first command exited successfully (exit code 0)
36+
if [ $command1_exit_code -eq 0 ]; then
37+
# Run the second command
38+
sudo perl -V > test-output-${{ inputs.os }}-${{ inputs.version }}-perl${{ inputs.perl }}.${{inputs.perl_subversion}}-${{ inputs.arch }}.txt
39+
command2_exit_code=$?
40+
else
41+
# Print error message to a file (replace "error.log" with your desired filename)
42+
echo "Error!" > test-output-${{ inputs.os }}-${{ inputs.version }}-perl${{ inputs.perl }}.${{inputs.perl_subversion}}-${{ inputs.arch }}.txt
43+
# Exit with the first command's exit code
44+
exit $command1_exit_code
45+
fi
46+
shell: bash
47+
version: '${{ inputs.version }}'
48+
- name: Upload results as artifact
49+
uses: actions/upload-artifact@v5.0.0
50+
continue-on-error: true
51+
with:
52+
if-no-files-found: error
53+
name: 'test-output-${{ inputs.os }}-${{ inputs.version }}-perl${{ inputs.perl }}.${{inputs.perl_subversion}}-${{ inputs.arch }}'
54+
path: 'test-output-${{ inputs.os }}-${{ inputs.version }}-perl${{ inputs.perl }}.${{inputs.perl_subversion}}-${{ inputs.arch }}.txt'
55+
name: bsd module
56+
on:
57+
workflow_call:
58+
inputs:
59+
arch:
60+
required: true
61+
type: string
62+
host:
63+
required: true
64+
type: string
65+
os:
66+
required: true
67+
type: string
68+
perl:
69+
required: true
70+
type: string
71+
perl_subversion:
72+
required: false
73+
type: string
74+
default: "2"
75+
pkg:
76+
required: true
77+
type: string
78+
version:
79+
required: true
80+
type: string
81+
setup:
82+
required: false
83+
type: string
84+
default: ""

.github/workflows/delete_logs.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Delete old workflow runs
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
days:
6+
description: "Days to retain runs"
7+
required: true
8+
default: "30"
9+
minimum_runs:
10+
description: "Minimum runs to keep"
11+
required: true
12+
default: "6"
13+
delete_workflow_pattern:
14+
description: "Workflow name or filename (omit for all). Use `|` to separate multiple filters (e.g. 'build|deploy')."
15+
required: false
16+
delete_workflow_by_state_pattern:
17+
description: "Workflow state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually"
18+
required: false
19+
default: "ALL"
20+
type: choice
21+
options:
22+
- "ALL"
23+
- active
24+
- deleted
25+
- disabled_inactivity
26+
- disabled_manually
27+
delete_run_by_conclusion_pattern:
28+
description: "Run conclusion: action_required, cancelled, failure, skipped, success"
29+
required: false
30+
default: "ALL"
31+
type: choice
32+
options:
33+
- "ALL"
34+
- "Unsuccessful: action_required,cancelled,failure,skipped"
35+
- action_required
36+
- cancelled
37+
- failure
38+
- skipped
39+
- success
40+
dry_run:
41+
description: "Simulate deletions"
42+
required: false
43+
default: "false"
44+
type: choice
45+
options:
46+
- "false"
47+
- "true"
48+
check_branch_existence:
49+
description: "Skip deletions linked to an existing branch"
50+
required: false
51+
default: "true"
52+
type: choice
53+
options:
54+
- "false"
55+
- "true"
56+
57+
jobs:
58+
delete-runs:
59+
runs-on: ubuntu-latest
60+
permissions:
61+
actions: write
62+
contents: read
63+
steps:
64+
- name: Delete workflow runs
65+
uses: Mattraks/delete-workflow-runs@v2.1.0
66+
with:
67+
token: ${{ github.token }}
68+
repository: ${{ github.repository }}
69+
retain_days: ${{ github.event.inputs.days }}
70+
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }}
71+
delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }}
72+
delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }}
73+
delete_run_by_conclusion_pattern: >-
74+
${{
75+
startsWith(github.event.inputs.delete_run_by_conclusion_pattern, 'Unsuccessful:') &&
76+
'action_required,cancelled,failure,skipped' ||
77+
github.event.inputs.delete_run_by_conclusion_pattern
78+
}}
79+
check_branch_existence: ${{ github.event.inputs.check_branch_existence }}
80+
dry_run: ${{ github.event.inputs.dry_run }}

0 commit comments

Comments
 (0)