Skip to content

Commit bf8a15a

Browse files
committed
Add building nobuild config to actions. Fix executable permissions to being retained over final copy.
Squashed commit of the following: commit 0e0e02f Author: Gavin Hayes <[email protected]> Date: Sun Nov 27 19:19:06 2022 -0500 cleanup actions commit 07c1270 Author: Gavin Hayes <[email protected]> Date: Sun Nov 27 19:05:40 2022 -0500 fix permissions not being preserved when doing final executable copy commit 7a5ee8f Author: Gavin Hayes <[email protected]> Date: Sun Nov 27 18:38:22 2022 -0500 add building nobuild config commit 606a196 Author: Gavin Hayes <[email protected]> Date: Sun Nov 27 18:24:26 2022 -0500 add building nobuild config
1 parent 970387b commit bf8a15a

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

.github/workflows/build.yml

+24-1
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,33 @@ jobs:
129129
if-no-files-found: error
130130
path: release/${{ env.DEST_BIN }}
131131

132+
test-nobuild-builds:
133+
name: Test building nobuild configs
134+
needs: build-apperl
135+
strategy:
136+
matrix:
137+
os: [ubuntu-latest] #, windows-latest]
138+
runs-on: ${{ matrix.os }}
139+
steps:
140+
- name: Fetch build artifacts
141+
uses: actions/download-artifact@v3
142+
- name: support ape bins
143+
run: sudo sh -c "echo ':APE:M::MZqFpD::/bin/sh:' >/proc/sys/fs/binfmt_misc/register"
144+
- name: Try nobuild build
145+
run: |
146+
mkdir src
147+
cp full/perl.com src/
148+
printf "%s\n" 'print "Hello, World!\n";' > src/hello
149+
echo '{"defaultconfig":"hello","apperl_configs":{"hello":{"dest":"hello.com","base":"nobuild-v0.1.0","zip_extra_files":{"bin":["src/hello"]}}}}' > apperl-project.json
150+
chmod +x src/perl.com
151+
src/perl.com /zip/bin/apperlm list
152+
src/perl.com /zip/bin/apperlm build
153+
./hello.com
154+
132155
create-release:
133156
name: Create release
134157
runs-on: ubuntu-latest
135-
needs: [ build-linux, build-apperl, test-Perl-Dist-APPerl ]
158+
needs: [ build-linux, build-apperl, test-Perl-Dist-APPerl, test-nobuild-builds ]
136159
steps:
137160
- name: Fetch build artifacts
138161
if: ${{ github.ref_type == 'tag' }}

lib/Perl/Dist/APPerl.pm

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use File::Path 2.07 qw(make_path remove_tree);
88
use Cwd qw(abs_path getcwd);
99
use Data::Dumper qw(Dumper);
1010
use File::Basename qw(basename dirname);
11-
use File::Copy qw(copy move);
11+
use File::Copy qw(copy move cp);
1212
use Env qw(@PATH);
1313
use FindBin qw();
1414
use Getopt::Long qw(GetOptionsFromArray);
@@ -1068,7 +1068,7 @@ sub Build {
10681068
chdir(START_WD) or die "Failed to restore cwd";
10691069
my @args = ("$UserProjectConfig->{apperl_output}/$CurAPPerlName/perl.com", $itemconfig->{dest});
10701070
print 'cp '.join(' ', @args)."\n";
1071-
copy(@args) or die "copy failed: $!";
1071+
cp(@args) or die "copy failed: $!";
10721072
}
10731073
}
10741074

0 commit comments

Comments
 (0)