| name: CI |
| |
| on: [push, pull_request] |
| |
| jobs: |
| test: |
| runs-on: ${{ matrix.os }} |
| strategy: |
| matrix: |
| include: |
| - os: ubicloud-standard-2-arm |
| container: 'ubuntu:latest' |
| artifact: 'ubuntu' |
| |
| - os: ubicloud-standard-2 |
| container: 'alpine:latest' |
| artifact: 'alpine' |
| |
| - os: ubicloud-standard-2 |
| container: 'rockylinux:9' |
| artifact: 'rockylinux' |
| |
| - os: windows-latest |
| artifact: 'windows' |
| |
| - os: macos-latest |
| artifact: 'macos' |
| |
| container: ${{ matrix.container }} |
| steps: |
| - name: Install Ubuntu packages |
| if: matrix.container == 'ubuntu:latest' |
| run: | |
| apt update |
| apt -y install git make pbzip2 binutils bzip2 zstd gnupg openssl |
| |
| - name: Install RockyLinux packages |
| if: matrix.container == 'rockylinux:9' |
| run: | |
| dnf groupinstall -y "Development Tools" "RPM Development Tools" |
| dnf install -y zstd binutils binutils-devel gnupg2 pbzip2 openssl |
| |
| - name: Install Alpine packages |
| if: matrix.container == 'alpine:latest' |
| run: apk add --no-cache bash git make libarchive-tools gnupg coreutils binutils bzip2 zstd openssl |
| |
| - name: Install macOS packages |
| if: runner.os == 'macOS' |
| run: brew install pbzip2 coreutils |
| |
| - name: Checkout Makeself |
| uses: actions/checkout@v4 |
| with: |
| submodules: 'true' |
| |
| - name: Build release |
| run: make |
| |
| - uses: actions/upload-artifact@v4 |
| with: |
| name: build-${{ matrix.artifact }} |
| path: release |
| |
| - name: Run tests |
| run: make test |
| |
| test-freebsd: |
| needs: test |
| runs-on: ubuntu-latest |
| name: Test Makeself on FreeBSD |
| steps: |
| - uses: actions/checkout@v5 |
| - uses: actions/download-artifact@v5 |
| - name: Test on FreeBSD |
| uses: vmactions/freebsd-vm@v1 |
| with: |
| usesh: true |
| prepare: pkg install -y pbzip2 |
| run: | |
| pwd; freebsd-version |
| sh ./test/run-makeself.sh |
| |
| test-openbsd: |
| needs: test |
| runs-on: ubuntu-latest |
| name: Test Makeself on OpenBSD |
| steps: |
| - uses: actions/checkout@v5 |
| - uses: actions/download-artifact@v5 |
| - name: Test on OpenBSD |
| uses: vmactions/openbsd-vm@v1 |
| with: |
| usesh: true |
| prepare: /usr/sbin/pkg_add pbzip2 |
| run: | |
| pwd |
| sh ./test/run-makeself.sh |
| |
| test-netbsd: |
| needs: test |
| runs-on: ubicloud-standard-2-arm |
| name: Test Makeself on NetBSD |
| steps: |
| - uses: actions/checkout@v5 |
| - uses: actions/download-artifact@v5 |
| - name: Test on NetBSD |
| uses: vmactions/netbsd-vm@v1 |
| with: |
| usesh: true |
| prepare: /usr/sbin/pkg_add pbzip2 |
| run: | |
| pwd |
| sh ./test/run-makeself.sh |
| |
| test-solaris: |
| needs: test |
| runs-on: ubuntu-latest |
| name: Test Makeself on Solaris |
| steps: |
| - uses: actions/checkout@v5 |
| - uses: actions/download-artifact@v5 |
| - name: Test on Solaris |
| uses: vmactions/solaris-vm@v1 |
| with: |
| mem: 2048 |
| prepare: pkgutil -y -i pbzip2 |
| run: | |
| pwd |
| sh ./test/run-makeself.sh |
| |
| test-alpine: |
| needs: test |
| name: Test Makeself on Alpine |
| runs-on: ubuntu-latest |
| container: alpine:latest |
| steps: |
| - uses: actions/checkout@v5 |
| - uses: actions/download-artifact@v5 |
| - name: Test on Alpine |
| run: sh ./test/run-makeself.sh |
| |
| 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/checkout@v5 |
| - uses: actions/download-artifact@v5 |
| |
| - name: pull windows container ${{ env.IMAGE_NAME }} |
| shell: cmd |
| run: | |
| docker pull ${{ env.IMAGE_NAME }} |
| docker images ${{ env.IMAGE_NAME }} |
| |
| - name: download tools |
| shell: cmd |
| run: curl --fail --silent --show-error --remote-name --location "https://frippery.org/files/busybox/busybox64.exe" |
| |
| - 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 }} C:\app\busybox64.exe sh ./test/run-makeself.sh |
| |
| lint: |
| runs-on: ubuntu-latest |
| |
| steps: |
| - name: Checkout Makeself |
| uses: actions/checkout@v5 |
| - name: Run ShellCheck |
| uses: megastep/shell-linter@develop |
| with: |
| path: "makeself.sh" |
| severity: "error" |