Skip to content

Commit

Permalink
Start working on *BSD
Browse files Browse the repository at this point in the history
  • Loading branch information
sanko committed Mar 17, 2024
1 parent 8c93f2f commit fd2dd72
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 6 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: BSD

on: [push]

jobs:
test:
runs-on: ubuntu-latest
name: ${{ matrix.os.name }}
strategy:
fail-fast: false
matrix:
os:
- name: freebsd
architecture: x86-64
version: '14.0'
pkg: sudo pkg install -y perl5

#~ - name: netbsd
#~ architecture: x86-64
#~ version: '9.3'
#~ # https://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/lang/perl5/index.html
#~ pkg: sudo pkgin -y install perl-5.38.2

steps:
- uses: actions/checkout@v4
- name: Test on ${{ matrix.os.name }}
uses: cross-platform-actions/action@v0.23.0
env:
MY_ENV1: MY_ENV1
MY_ENV2: MY_ENV2
with:
environment_variables: MY_ENV1 MY_ENV2
operating_system: ${{ matrix.os.name }}
architecture: ${{ matrix.os.architecture }}
version: ${{ matrix.os.version }}
shell: bash
memory: 5G
cpu_count: 4
run: |
uname -a
echo $SHELL
pwd
ls -lah
whoami
env | sort
${{ matrix.os.pkg }} p5-App-cpanminus git gmake
perl -V
gmake -v
cpanm -v --mirror http://cpan.cpantesters.org/ .
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Revision history for Perl extension Alien::xmake

{{$NEXT}}

- Install v2.8.8 on Windows

0.02 2024-03-17T00:38:59Z

- Minor documentation changes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Actions Status](https://github.com/sanko/Alien-xmake/actions/workflows/linux.yml/badge.svg)](https://github.com/sanko/Alien-xmake/actions) [![Actions Status](https://github.com/sanko/Alien-xmake/actions/workflows/windows.yml/badge.svg)](https://github.com/sanko/Alien-xmake/actions) [![Actions Status](https://github.com/sanko/Alien-xmake/actions/workflows/macos.yml/badge.svg)](https://github.com/sanko/Alien-xmake/actions) [![MetaCPAN Release](https://badge.fury.io/pl/Alien-xmake.svg)](https://metacpan.org/release/Alien-xmake)
[![Actions Status](https://github.com/sanko/Alien-xmake/actions/workflows/linux.yml/badge.svg)](https://github.com/sanko/Alien-xmake/actions) [![Actions Status](https://github.com/sanko/Alien-xmake/actions/workflows/windows.yml/badge.svg)](https://github.com/sanko/Alien-xmake/actions) [![Actions Status](https://github.com/sanko/Alien-xmake/actions/workflows/macos.yml/badge.svg)](https://github.com/sanko/Alien-xmake/actions) [![Actions Status](https://github.com/sanko/Alien-xmake/actions/workflows/bsd.yml/badge.svg)](https://github.com/sanko/Alien-xmake/actions) [![MetaCPAN Release](https://badge.fury.io/pl/Alien-xmake.svg)](https://metacpan.org/release/Alien-xmake)
# NAME

Alien::xmake - Locate, Download, or Build and Install xmake
Expand Down
9 changes: 5 additions & 4 deletions builder/xmake.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ package builder::xmake {
#
#~ use Data::Dump;
#
my $version = 'v2.8.3'; # Target install version
my $version = 'v2.8.8'; # Target install version
my $branch = 'master';

#~ my $installer_sh = 'https://xmake.io/shget.text';
Expand Down Expand Up @@ -110,11 +110,12 @@ package builder::xmake {
File::Spec->catdir( $s->base_dir, @{ $s->share_dir->{dist} } ) );
$s->log_info(qq[Running installer [$installer]...\n]);
$s->do_system( $installer, '/NOADMIN', '/S', '/D=' . $dest );
$s->log_info(qq[Installer complete\n]);
$s->log_info(qq[Installed to $dest\n]);
push @PATH, $dest;
my $xmake = $s->locate_xmake();
$s->config_data( xmake_type => 'share' );
$s->gather_info($xmake);
$s->config_data( xmake_install => $dest );

# D:\a\_temp\1aa1c77c-ff7b-41bc-8899-98e4cd421618.exe /NOADMIN /S /D=C:\Users\RUNNER~1\AppData\Local\Temp\xmake-15e5f277191e8a088998d0f797dd1f44b5491e17
#~ $s->warn_info('Windows is on the todo list');
Expand All @@ -132,6 +133,7 @@ package builder::xmake {
#
$s->config_data( xmake_type => 'share' );
}
$s->config_data( xmake_install => $xmake );
$s->gather_info($xmake);
return File::Spec->rel2abs($xmake);
}
Expand Down Expand Up @@ -186,7 +188,7 @@ package builder::xmake {
my $make;
{
for (qw[make gmake]) {
if ( system( $_, '--version' ) == 0 ) {
if ( `$_ --version` =~ /GNU Make/ ) {
$make = $_;
last;
}
Expand All @@ -197,7 +199,6 @@ package builder::xmake {
{
my ( $fh, $filename ) = tempfile();
syswrite $fh, "#include <stdio.h>\nint main(){return 0;}";
die 'Please install git' if system 'git', '--version';
for (qw[gcc cc clang]) {
if ( !system $_, qw'-x c', $filename,
qw'-o /dev/null -I/usr/include -I/usr/local/include' ) {
Expand Down
2 changes: 1 addition & 1 deletion minil.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "Alien-xmake"
badges = ["github-actions/linux.yml", "github-actions/windows.yml", "github-actions/macos.yml", "metacpan"]
badges = ["github-actions/linux.yml", "github-actions/windows.yml", "github-actions/macos.yml", "github-actions/bsd.yml","metacpan"]
module_maker="ModuleBuild"
static_install = "auto"
authority = "cpan:SANKO"
Expand Down

0 comments on commit fd2dd72

Please sign in to comment.