Don't build and install jw-pkg official before a jw-pkg test build. jw-pkg should be self-contained enough to be able to build itself.
Signed-off-by: Jan Lindemann <jan@janware.com>
68 lines
2.2 KiB
YAML
68 lines
2.2 KiB
YAML
name: Reusable packaging test job
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
enable-email-notifications: true
|
|
|
|
jobs:
|
|
test:
|
|
name: Packaging - ${{ matrix.distro.name }}
|
|
runs-on: public-ci
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
distro:
|
|
- { image: "registry.janware.com/public/ci/runner/opensuse/tumbleweed:latest", name: "OpenSUSE Tumbleweed" }
|
|
- { image: "registry.janware.com/public/ci/runner/kali/rolling:latest", name: "Kali Linux" }
|
|
|
|
container:
|
|
image: ${{ matrix.distro.image }}
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: ci/action-checkout@main-jw
|
|
with:
|
|
path: ${{ github.event.repository.name }}
|
|
working-directory: ${{ github.event.repository.name }}
|
|
persist-credentials: false
|
|
|
|
- name: Install build prerequisites
|
|
shell: bash
|
|
if: ${{ github.event.repository.name != 'jw-pkg' }}
|
|
run: |
|
|
set -euxo pipefail
|
|
export PROJECTS_DIR_REMOTE_BASE=${{ github.server_url }}
|
|
owner=janware
|
|
makefile=$PROJECTS_DIR_REMOTE_BASE/$owner/jw-pkg/raw/branch/master/make/projects-dir-minimal.mk
|
|
curl --create-dirs -o build-jw-foss/Makefile "$makefile"
|
|
make -C build-jw-foss pkg-manager-refresh
|
|
make -C build-jw-foss pkg-install-release-deps
|
|
OFFLINE=true make -C build-jw-foss pkg-rebuild-reinstall
|
|
|
|
- name: Run pre-build static code checks
|
|
shell: bash
|
|
run: |
|
|
set -euxo pipefail
|
|
make -C "${{ github.event.repository.name }}" check
|
|
|
|
- name: Build package
|
|
shell: bash
|
|
run: |
|
|
set -euxo pipefail
|
|
make -C "${{ github.event.repository.name }}" pkg-manager-refresh
|
|
make -C "${{ github.event.repository.name }}" pkg-install-testbuild-deps
|
|
make -C "${{ github.event.repository.name }}" pkg-rebuild
|
|
|
|
- name: Run post-build static code checks
|
|
shell: bash
|
|
run: |
|
|
set -euxo pipefail
|
|
make -C "${{ github.event.repository.name }}" check
|
|
|
|
- name: Install package
|
|
shell: bash
|
|
run: |
|
|
set -euxo pipefail
|
|
make -C "${{ github.event.repository.name }}" pkg-reinstall
|