CI #573
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2024-2025 Paul Colby <git@colby.id.au> | |
| # SPDX-License-Identifier: MIT | |
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| schedule: | |
| - cron: '30 17 * * *' # Daily, 03:30 AEST / 04:30 AEDT. | |
| workflow_dispatch: | |
| permissions: { } | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Check Markdown files | |
| run: npm install markdownlint-cli2 --global && markdownlint-cli2 | |
| - name: Check shell scripts | |
| run: find . -name '*.sh' -print -execdir shellcheck --check-sourced --enable=all --external-sources --norc {} + | |
| - name: Check YAML files | |
| run: yamllint --strict . | |
| - name: Check run scripts | |
| uses: pcolby/check-run-scripts@v1 | |
| with: | |
| external-variables: INSTALL_DIR | |
| test-defaults: | |
| name: Defaults | |
| runs-on: ubuntu-${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./ | |
| - run: linuxdeploy-"${LINUXDEPLOY_ARCH}".AppImage --list-plugins | |
| env: | |
| LINUXDEPLOY_ARCH: ${{ endsWith(matrix.os, '-arm') && 'aarch64' || 'x86_64' }} | |
| strategy: | |
| matrix: | |
| os: | |
| - 22.04 | |
| - 22.04-arm | |
| - 24.04 | |
| - 24.04-arm | |
| fail-fast: false | |
| test-options: | |
| name: Options | |
| runs-on: ubuntu-${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Define test install dir | |
| run: tee -a "${GITHUB_ENV}" <<< "INSTALL_DIR=${RUNNER_TEMP}/test/linuxdeploy/bin" | |
| - name: Record pre-state | |
| run: | | |
| apt list --installed > "${RUNNER_TEMP}/apt.pre" | |
| env | grep -v '^GITHUB_' | sort > "${RUNNER_TEMP}/env.pre" | |
| - name: Install linuxdeploy, overriding all options | |
| uses: ./ | |
| with: | |
| arch: i386 | |
| dir: ${{ env.INSTALL_DIR }} | |
| install-deps: false | |
| plugins: appimage@1-alpha-20250213-1 qt@1-alpha-20250213-1 | |
| set-env: false | |
| version: 1-alpha-20250213-2 | |
| - name: Check post-state | |
| run: | | |
| apt list --installed > "${RUNNER_TEMP}/apt.post" | |
| env | grep -v '^GITHUB_' | sort > "${RUNNER_TEMP}/env.post" | |
| diff -u "${RUNNER_TEMP}/apt."{pre,post} | |
| diff -u "${RUNNER_TEMP}/env."{pre,post} | |
| - name: Check installed binaries | |
| run: | | |
| sha384sum "${INSTALL_DIR}"/*.AppImage # Log the actual checksums for debugging / diagnostics. | |
| sha384sum --check --strict <<-- | |
| c816c8aa33c5c7fb9a5dbdec50fa0a4546dabfc9397df8e144c1ba38a0158f2962f2d0299ce42b372e0355911e182a52\ | |
| ${INSTALL_DIR}/linuxdeploy-i386.AppImage | |
| 625b34c982fbc873cda0282d4d378ea323fd78a48687b6cd5bbe2a11f4c4c1cee5ddfa4f74bf9afb2eb22086bfc58971\ | |
| ${INSTALL_DIR}/linuxdeploy-plugin-appimage-i686.AppImage | |
| 6cc269e593cc5febbeb4af61d2fc288bd59498d39a5a2e56bac2c66b371aadf11d6e057f3a205a42d945b2d87304fe71\ | |
| ${INSTALL_DIR}/linuxdeploy-plugin-qt-i386.AppImage | |
| - | |
| strategy: | |
| matrix: | |
| os: | |
| - 22.04 | |
| - 22.04-arm | |
| - 24.04 | |
| - 24.04-arm | |
| fail-fast: false | |
| test-plugins: | |
| name: Plugins | |
| runs-on: ubuntu-${{ matrix.os }} | |
| env: | |
| MATRIX_OS: ${{ matrix.os }} | |
| PLUGINS: >- | |
| appimage | |
| checkrt | |
| conda | |
| demo | |
| gdb | |
| gettext | |
| grantlee5 | |
| gstreamer | |
| gtk | |
| native_packages | |
| ncurses | |
| python | |
| qt | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Filter plugins not supported for this arch | |
| run: | | |
| [[ "${MATRIX_OS}" != *-arm ]] || | |
| PLUGINS=$(sed -Ee 's/(appimage|native_packages|python)//g' \ | |
| -e 's/ +/ /g' -e 's/(^ )|( $)//' <<< "${PLUGINS}") | |
| tee -a "${GITHUB_ENV}" <<< "PLUGINS=${PLUGINS}" | |
| - name: Install linuxdeploy, and all supported plugins | |
| uses: ./ | |
| with: | |
| plugins: ${{ env.PLUGINS }} | |
| - name: Check installed plugins | |
| run: | | |
| ls -l "${RUNNER_TEMP}/linuxdeploy" | |
| linuxdeploy-"${LINUXDEPLOY_ARCH}".AppImage --list-plugins | tee "${RUNNER_TEMP}/plugins.txt" | |
| mapfile -t plugins < <( | |
| sed -Ee '0,/^Available plugins:/d' -e 's/:.*//' "${RUNNER_TEMP}/plugins.txt" | sort || :) | |
| [[ "${MATRIX_OS}" != *-arm ]] || PLUGINS="appimage ${PLUGINS}" # linuxdeploy provides an appimage plugin. | |
| [[ "${plugins[*]}" == "${PLUGINS}" ]] || { | |
| echo "Expected: '${PLUGINS}'" | |
| echo "Actual: '${plugins[*]}'" | |
| false | |
| } | |
| env: | |
| LINUXDEPLOY_ARCH: ${{ endsWith(matrix.os, '-arm') && 'aarch64' || 'x86_64' }} | |
| strategy: | |
| matrix: | |
| os: | |
| - 22.04 | |
| - 22.04-arm | |
| - 24.04 | |
| - 24.04-arm | |
| fail-fast: false | |
| test-architectures: | |
| name: Archs | |
| runs-on: ubuntu-${{ matrix.os }}${{ matrix.arch == 'aarch64' && '-arm' || '' }} | |
| env: | |
| MATRIX_ARCH: ${{ matrix.arch }} | |
| # These should all be the latest official releases, however most (all?) plugins don't have official releases yet. | |
| PLUGINS: >- | |
| appimage@1-alpha-20250213-1 | |
| checkrt@r2 | |
| conda@master | |
| demo@master | |
| gdb@master | |
| gettext@master | |
| grantlee5@master | |
| gstreamer@master | |
| gtk@master | |
| native_packages@continuous | |
| ncurses@master | |
| python@continuous | |
| qt@1-alpha-20250213-1 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Filter plugins not supported for this arch | |
| run: | | |
| [[ "${MATRIX_ARCH}" =~ ^(i386|x86_64)$ ]] || | |
| PLUGINS=$(sed -Ee 's/appimage@[^ ]+//g' <<< "${PLUGINS}") | |
| [[ "${MATRIX_ARCH}" == 'x86_64' ]] || | |
| PLUGINS=$(sed -Ee 's/(native_packages|python)@[^ ]+//g' <<< "${PLUGINS}") | |
| tee -a "${GITHUB_ENV}" <<< "PLUGINS=${PLUGINS}" | |
| - name: Install linuxdeploy, and all supported plugins | |
| uses: ./ | |
| with: | |
| arch: ${{ matrix.arch }} | |
| plugins: ${{ env.PLUGINS }} | |
| - if: matrix.arch == 'aarch64' || matrix.arch == 'x86_64' | |
| run: linuxdeploy-${{ matrix.arch }}.AppImage --list-plugins | |
| strategy: | |
| matrix: | |
| os: | |
| - 22.04 | |
| - 24.04 | |
| arch: | |
| - aarch64 | |
| - armhf | |
| - i386 | |
| - x86_64 | |
| fail-fast: false |