Skip to content

Commit

Permalink
Swap GHA system
Browse files Browse the repository at this point in the history
  • Loading branch information
sanko committed Sep 14, 2024
1 parent 5fa3bf8 commit c8bc4fa
Show file tree
Hide file tree
Showing 11 changed files with 201 additions and 146 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/bsd.yml

This file was deleted.

154 changes: 154 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
---
jobs:
etc:
name: 'Other Platforms/v${{matrix.perl}}'
needs:
- setup
strategy:
fail-fast: false
matrix:
os:
- architecture: x86-64
host: ubuntu-20.04
name: freebsd
pkg: pkg install -y
version: 13.2
- architecture: arm64
host: ubuntu-20.04
name: freebsd
pkg: pkg install -y
version: 13.2
perl:
- 5.38
max-parallel: 25
uses: sanko/actions/.github/workflows/affix-cross.yml@main
with:
arch: '${{ matrix.os.architecture }}'
host: '${{ matrix.os.host }}'
os: '${{ matrix.os.name }}'
perl: '${{ matrix.perl }}'
pkg: '${{ matrix.os.pkg }}'
version: '${{ matrix.os.version }}'
linux:
name: 'Linux/v${{matrix.perl}}'
needs:
- setup
strategy:
fail-fast: false
matrix:
flags:
- ''
- -Dusethreads
- -Duselongdouble
- -Dusequadmath
os:
- ubuntu-22.04
perl: '${{ fromJSON(needs.setup.outputs.matrix).perl }}'
max-parallel: 25
uses: sanko/actions/.github/workflows/affix-unix.yml@main
with:
flags: '${{ matrix.flags }}'
os: '${{ matrix.os }}'
perl: '${{ matrix.perl }}'
macos:
name: "[${{ matrix.os == 'macos-14' && 'M1' || 'Intel' }}] macOS/v${{matrix.perl}}"
needs:
- setup
strategy:
fail-fast: false
matrix:
exclude:
- flags: -Dusequadmath
- flags: -Dusethreads
flags: '${{ fromJSON(needs.setup.outputs.matrix).flags }}'
os:
- macos-14
- macos-latest
perl: '${{ fromJSON(needs.setup.outputs.matrix).perl }}'
max-parallel: 25
uses: sanko/actions/.github/workflows/affix-unix.yml@main
with:
flags: '${{ matrix.flags }}'
os: '${{ matrix.os }}'
perl: '${{ matrix.perl }}'
results:
name: Results
needs:
- macos
- win32
- linux
runs-on: ubuntu-22.04
steps:
- name: Download test results
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Report test results
run: |
# Function to process a directory
process_dir() {
local dir="$1"
# Loop through each element in the directory
for file in "$dir"/*; do
# Check if it's a directory
if [ -d "$file" ]; then
# Recursively call process_dir for subdirectories (except .)
if [ "$file" != "." ]; then
process_dir "$file"
fi
# If it's a regular file, print its content
elif [ -f "$file" ]; then
echo "================> $file <================"
cat "$file"
echo "" # Add an empty line between files
fi
done
}
# Get the directory path from the first argument (or current directory)
dir=${1:-.}
# Process the specified directory
process_dir "artifacts"
setup:
name: Generate Testing Matrix
outputs:
matrix: '${{ steps.matrix.outputs.matrix }}'
runs-on: ubuntu-22.04
steps:
- env:
DATA: |
{
"perl": ["5.38.2", "5.40.0"],
"flags": ["", "-Dusethreads", "-Duselongdouble", "-Dusequadmath"]
}
id: matrix
run: "jq -rn 'env.DATA | fromjson | @json \"matrix=\\(.)\"' > $GITHUB_OUTPUT\n"
win32:
name: 'Windows/v${{matrix.perl}}'
needs:
- setup
strategy:
fail-fast: false
matrix:
exclude:
- perl: 5.40.0
- flags: -Duselongdouble
- flags: -Dusequadmath
flags:
- -Dusethreads
- ''
os:
- windows-2022
perl: '${{ fromJSON(needs.setup.outputs.matrix).perl }}'
max-parallel: 25
uses: sanko/actions/.github/workflows/affix-win32.yml@main
with:
flags: '${{ matrix.flags }}'
os: '${{ matrix.os }}'
perl: '${{ matrix.perl }}'
name: CI Matrix
on:
pull_request: ~
push: ~
schedule:
- cron: 42 5 * * 0
workflow_dispatch: ~
28 changes: 28 additions & 0 deletions .github/workflows/delete_cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
jobs:
clear-cache:
runs-on: ubuntu-latest
steps:
- name: 'Clear cache [https://stackoverflow.com/a/73556714]'
uses: actions/github-script@v7
with:
script: |
console.log("About to clear")
const caches = await github.rest.actions.getActionsCacheList({
owner: context.repo.owner,
repo: context.repo.repo,
})
for (const cache of caches.data.actions_caches) {
console.log(cache)
github.rest.actions.deleteActionsCacheById({
owner: context.repo.owner,
repo: context.repo.repo,
cache_id: cache.id,
})
}
console.log("Clear completed")
name: Clear cache
on:
workflow_dispatch: ~
permissions:
actions: write
22 changes: 0 additions & 22 deletions .github/workflows/linux.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/macos.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/windows.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ share/share
share/bin
*.session
xmake.*
.xmake/*
2 changes: 1 addition & 1 deletion META.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Sanko Robinson <sanko@cpan.org>"
],
"dynamic_config" : 0,
"generated_by" : "Minilla/v3.1.23, CPAN::Meta::Converter version 2.150010",
"generated_by" : "Minilla/v3.1.25, CPAN::Meta::Converter version 2.150010",
"license" : [
"artistic_2"
],
Expand Down
9 changes: 6 additions & 3 deletions builder/xmake.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package builder::xmake {
use Archive::Tar qw[];
use Path::Tiny qw[path];
#
my $version = '2.8.8'; # Target install version
my $version = '2.9.5'; # Target install version
my $installer_exe # Pretend we're 64bit
= "https://github.com/xmake-io/xmake/releases/download/v${version}/xmake-v${version}.win64.exe";
my $installer_tar
Expand Down Expand Up @@ -75,6 +75,7 @@ package builder::xmake {
$s->config_data( xrepo_exe => $xrepo );
$s->config_data( xmake_dir => File::Basename::dirname($xmake) );
my $run = `$xmake --version`;
warn $run;
my ($ver) = $run =~ m[xmake (v.+?), A cross-platform build utility based on Lua];
$s->config_data( xmake_ver => $ver );
$s->config_data( xmake_installed => 1 );
Expand All @@ -83,9 +84,10 @@ package builder::xmake {
# Module::Build subclass
sub ACTION_xmake_install {
my ($s) = @_;
use Data::Dump;

Check failure on line 87 in builder/xmake.pm

View workflow job for this annotation

GitHub Actions / Windows/v5.38.2 / Default

Can't locate Data/Dump.pm in @inc (you may need to install the Data::Dump module) (@inc entries checked: D:\a\Alien-xmake\Alien-xmake\local\lib\perl5/5.38.2/MSWin32-x64-multi D:\a\Alien-xmake\Alien-xmake\local\lib\perl5/5.38.2 D:\a\Alien-xmake\Alien-xmake\local\lib\perl5/MSWin32-x64-multi D:\a\Alien-xmake\Alien-xmake\local\lib\perl5 D:\a\Alien-xmake\Alien-xmake\local\lib\perl5\MSWin32-x64-multi D:\a\_actions\shogo82148\actions-setup-perl\v1.29.0\scripts\lib C:/hostedtoolcache/windows/perl/5.38.2/x64/site/lib C:/hostedtoolcache/windows/perl/5.38.2/x64/lib . .)

Check failure on line 87 in builder/xmake.pm

View workflow job for this annotation

GitHub Actions / Windows/v5.38.2 / Default

BEGIN failed--compilation aborted
ddx { $s->config_data };

#~ ddx $s->config_data;
return $s->config_data('xmake_type') if $s->config_data('xmake_type');
#~ return $s->config_data('xmake_type') if $s->config_data('xmake_type');
#
my $os = $s->os_type; # based on Perl::OSType
if ( !defined $os ) {
Expand Down Expand Up @@ -147,6 +149,7 @@ package builder::xmake {

sub ACTION_code {
my ($s) = @_;
warn 'CODE';

Check failure on line 152 in builder/xmake.pm

View workflow job for this annotation

GitHub Actions / Windows/v5.38.2 / Strawberry

CODE

Check failure on line 152 in builder/xmake.pm

View workflow job for this annotation

GitHub Actions / Windows/v5.38.2 / Strawberry

CODE
$s->depends_on('xmake_install');
$s->SUPER::ACTION_code;
}
Expand Down
Loading

0 comments on commit c8bc4fa

Please sign in to comment.