From fd2dd72bc83ac1e199df6b2c65a031ca3d8ca3a2 Mon Sep 17 00:00:00 2001 From: Sanko Robinson Date: Sun, 17 Mar 2024 10:53:04 -0400 Subject: [PATCH] Start working on *BSD --- .github/workflows/bsd.yml | 49 +++++++++++++++++++++++++++++++++++++++ Changes | 2 ++ README.md | 2 +- builder/xmake.pm | 9 +++---- minil.toml | 2 +- 5 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/bsd.yml diff --git a/.github/workflows/bsd.yml b/.github/workflows/bsd.yml new file mode 100644 index 0000000..a8e9119 --- /dev/null +++ b/.github/workflows/bsd.yml @@ -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/ . diff --git a/Changes b/Changes index a067e03..605a2de 100644 --- a/Changes +++ b/Changes @@ -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 diff --git a/README.md b/README.md index 503ed53..c4f75a4 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/builder/xmake.pm b/builder/xmake.pm index c2b00a8..def1ac3 100644 --- a/builder/xmake.pm +++ b/builder/xmake.pm @@ -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'; @@ -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'); @@ -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); } @@ -186,7 +188,7 @@ package builder::xmake { my $make; { for (qw[make gmake]) { - if ( system( $_, '--version' ) == 0 ) { + if ( `$_ --version` =~ /GNU Make/ ) { $make = $_; last; } @@ -197,7 +199,6 @@ package builder::xmake { { my ( $fh, $filename ) = tempfile(); syswrite $fh, "#include \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' ) { diff --git a/minil.toml b/minil.toml index 5b9a890..86c16df 100644 --- a/minil.toml +++ b/minil.toml @@ -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"