summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandr Reshetnikov <hemnstill@users.noreply.github.com>2022-02-07 14:21:20 +0400
committerGitHub <noreply@github.com>2022-02-07 02:21:20 -0800
commit64674c741600cf0e1879cd098e4038cf5ca5d8fe (patch)
treef6c261dbce164464d2cd6cef593db55cad58c23d
parent5809be74e15eacf38f0e50d07a0612f4ca77c78a (diff)
downloadmakeself-64674c741600cf0e1879cd098e4038cf5ca5d8fe.tar.gz
add test on Alpine and Nanoserver using busybox (#265)
* alpine and nanoserver tests * revert custom tools * try remove prepare steps * revert install pbzip2 Co-authored-by: Решетников Александр (Reshetnikov_AS) <Reshetnikov_AS@directum.ru>
-rw-r--r--.github/workflows/build.yml112
-rwxr-xr-xmakeself.sh1
-rwxr-xr-xrun-tests.sh7
3 files changed, 91 insertions, 29 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 02af9fe..f25f224 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -10,7 +10,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- - name: Install Linux packages
+ - name: Install Ubuntu packages
if: runner.os == 'Linux'
run: sudo env DEBIAN_FRONTEND=noninteractive apt-get -qq -y install pbzip2 zstd
@@ -20,14 +20,13 @@ jobs:
- name: Checkout Makeself
uses: actions/checkout@v2
+ with:
+ submodules: 'true'
- name: Build release
- run: |
- git submodule update --init --recursive
- make
+ run: make
- - name: Upload build artifact
- uses: actions/upload-artifact@v1
+ - uses: actions/upload-artifact@v1
with:
name: Makeself-Build-${{ runner.os }}
path: release
@@ -35,27 +34,34 @@ jobs:
- name: Run tests
run: make test
+ test-make-alpine:
+ runs-on: ubuntu-latest
+ container: alpine:latest
+ steps:
+ - name: install deps
+ run: apk add --no-cache bash git make libarchive-tools gnupg coreutils
+
+ - uses: actions/checkout@v2
+ with:
+ submodules: 'true'
+
+ - name: Run tests
+ run: make test
+
test-freebsd:
needs: test
runs-on: macos-10.15
name: Test Makeself on FreeBSD
steps:
- - name: Checkout Makeself
- uses: actions/checkout@v2
- - name: Install git submodules
- run: git submodule update --init --recursive
- - name: Download Linux-built artifact
- uses: actions/download-artifact@v2
+ - uses: actions/download-artifact@v2
with:
name: Makeself-Build-Linux
path: linux
- - name: Download Mac-built artifact
- uses: actions/download-artifact@v2
+ - uses: actions/download-artifact@v2
with:
name: Makeself-Build-macOS
path: mac
- - name: Download Windows-built artifact
- uses: actions/download-artifact@v2
+ - uses: actions/download-artifact@v2
with:
name: Makeself-Build-Windows
path: windows
@@ -63,7 +69,7 @@ jobs:
uses: vmactions/freebsd-vm@v0.1.5
with:
usesh: true
- prepare: pkg install -y pbzip2 bash
+ prepare: pkg install -y pbzip2
run: |
pwd; freebsd-version
sh ./linux/makeself*.run --target /tmp/makeself-linux
@@ -75,22 +81,15 @@ jobs:
runs-on: macos-10.15
name: Test Makeself on Solaris
steps:
- - name: Checkout Makeself
- uses: actions/checkout@v2
- - name: Install git submodules
- run: git submodule update --init --recursive
- - name: Download Linux-built artifact
- uses: actions/download-artifact@v2
+ - uses: actions/download-artifact@v2
with:
name: Makeself-Build-Linux
path: linux
- - name: Download Mac-built artifact
- uses: actions/download-artifact@v2
+ - uses: actions/download-artifact@v2
with:
name: Makeself-Build-macOS
path: mac
- - name: Download Windows-built artifact
- uses: actions/download-artifact@v2
+ - uses: actions/download-artifact@v2
with:
name: Makeself-Build-Windows
path: windows
@@ -105,6 +104,65 @@ jobs:
sh ./mac/makeself*.run --target /tmp/makeself-mac
sh ./windows/makeself*.run --target /tmp/makeself-windows
+ test-alpine:
+ needs: test
+ name: Test Makeself on Alpine
+ runs-on: ubuntu-latest
+ container: alpine:latest
+ steps:
+ - uses: actions/download-artifact@v2
+ with:
+ name: Makeself-Build-Linux
+ path: linux
+ - uses: actions/download-artifact@v2
+ with:
+ name: Makeself-Build-macOS
+ path: mac
+ - uses: actions/download-artifact@v2
+ with:
+ name: Makeself-Build-Windows
+ path: windows
+ - name: Test on Alpine
+ run: |
+ sh ./linux/makeself*.run --target /tmp/makeself-linux
+ sh ./mac/makeself*.run --target /tmp/makeself-mac
+ sh ./windows/makeself*.run --target /tmp/makeself-windows
+
+ test-nanoserver:
+ needs: test
+ name: Test Makeself on Nanoserver
+ runs-on: windows-2022
+ env:
+ IMAGE_NAME: mcr.microsoft.com/windows/nanoserver:ltsc2022-amd64
+
+ steps:
+ - uses: actions/download-artifact@v2
+ with:
+ name: Makeself-Build-Linux
+ path: linux
+ - uses: actions/download-artifact@v2
+ with:
+ name: Makeself-Build-macOS
+ path: mac
+ - uses: actions/download-artifact@v2
+ with:
+ name: Makeself-Build-Windows
+ path: windows
+
+ - name: pull windows container ${{ env.IMAGE_NAME }}
+ shell: cmd
+ run: |
+ docker pull ${{ env.IMAGE_NAME }}
+ docker images ${{ env.IMAGE_NAME }}
+
+ - name: Test on Nanoserver
+ shell: cmd
+ run: >
+ docker container run --rm --env CI=true -v ${{ github.workspace }}:C:\app -w C:\app ${{ env.IMAGE_NAME }}
+ curl --fail --silent --show-error --remote-name --location "https://frippery.org/files/busybox/busybox64.exe" &&
+ busybox64 sh .\linux\makeself*.run --target \tmp\makeself-linux &&
+ busybox64 sh .\mac\makeself*.run --target \tmp\makeself-mac &&
+ busybox64 sh .\windows\makeself*.run --target \tmp\makeself-windows
lint:
runs-on: ubuntu-latest
diff --git a/makeself.sh b/makeself.sh
index df55a8d..47025d2 100755
--- a/makeself.sh
+++ b/makeself.sh
@@ -652,6 +652,7 @@ fi
# See if we have GNU tar
TAR=`exec <&- 2>&-; which gtar || command -v gtar || type gtar`
+test -x "$TAR" || TAR=`exec <&- 2>&-; which bsdtar || command -v bsdtar || type bsdtar`
test -x "$TAR" || TAR=tar
tmparch="${TMPDIR:-/tmp}/mkself$$.tar"
diff --git a/run-tests.sh b/run-tests.sh
index 31ee165..e6428ef 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -1,8 +1,11 @@
#!/bin/sh
# Run every available test - Bash needed
-cd test
+
+THISDIR="$(realpath "$(dirname "$0")")"
+
+cd "$THISDIR/test"
for test in *test;
do
echo "Running test $test ..."
- bash $test || { echo "*** ERROR: Test '$test' failed!"; exit 1; }
+ bash "$test" || { echo "*** ERROR: Test '$test' failed!"; exit 1; }
done