2021-01-18 15:02:52 +01:00
|
|
|
name: Check build
|
2020-11-02 22:09:05 +01:00
|
|
|
|
2021-01-18 15:02:52 +01:00
|
|
|
on:
|
|
|
|
pull_request:
|
2022-04-14 20:33:43 +02:00
|
|
|
paths:
|
|
|
|
- 'srcpkgs/**'
|
2021-01-18 15:02:52 +01:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'ci-**'
|
2022-04-14 20:33:43 +02:00
|
|
|
paths:
|
|
|
|
- 'srcpkgs/**'
|
2020-11-02 22:09:05 +01:00
|
|
|
|
2022-05-17 18:41:17 +02:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-11-02 22:09:05 +01:00
|
|
|
jobs:
|
|
|
|
# Lint changed templates.
|
|
|
|
xlint:
|
|
|
|
name: Lint templates
|
2022-05-17 17:42:47 +02:00
|
|
|
runs-on: ubuntu-latest
|
2020-11-02 22:09:05 +01:00
|
|
|
|
2023-09-06 02:10:28 +02:00
|
|
|
container:
|
|
|
|
image: 'ghcr.io/void-linux/void-buildroot-musl:20230904R2'
|
|
|
|
env:
|
2023-09-09 06:29:57 +02:00
|
|
|
PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
|
2023-09-06 02:10:28 +02:00
|
|
|
LICENSE_LIST: common/travis/license.lst
|
2020-11-02 22:09:05 +01:00
|
|
|
|
|
|
|
steps:
|
2023-09-06 02:10:28 +02:00
|
|
|
- name: Prepare container
|
|
|
|
run: |
|
|
|
|
# switch to repo-ci mirror
|
|
|
|
mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
|
|
|
|
sed -i 's|repo-default|repo-ci|g' /etc/xbps.d/*-repository-*.conf
|
|
|
|
# Sync and upgrade once, assume error comes from xbps update
|
|
|
|
xbps-install -Syu || xbps-install -yu xbps
|
|
|
|
# Upgrade again (in case there was a xbps update)
|
|
|
|
xbps-install -yu
|
|
|
|
# install tools needed for lints
|
2023-09-09 06:23:05 +02:00
|
|
|
xbps-install -y grep curl git
|
2022-12-16 11:00:52 +01:00
|
|
|
- name: Clone and checkout
|
2023-01-28 12:46:52 +01:00
|
|
|
uses: classabbyamp/treeless-checkout-action@v1
|
2023-09-06 02:10:28 +02:00
|
|
|
- name: Create hostrepo and prepare masterdir
|
|
|
|
run: |
|
|
|
|
ln -s "$(pwd)" /hostrepo &&
|
|
|
|
common/travis/set_mirror.sh &&
|
|
|
|
common/travis/prepare.sh &&
|
|
|
|
common/travis/fetch-xtools.sh
|
2020-11-02 22:09:05 +01:00
|
|
|
- run: common/travis/changed_templates.sh
|
2023-07-08 21:05:19 +02:00
|
|
|
- name: Run lints
|
|
|
|
run: |
|
|
|
|
rv=0
|
|
|
|
common/travis/xlint.sh || rv=1
|
|
|
|
common/travis/verify-update-check.sh || rv=1
|
|
|
|
exit $rv
|
2020-11-02 22:09:05 +01:00
|
|
|
|
|
|
|
# Build changed packages.
|
|
|
|
build:
|
|
|
|
name: Build packages
|
2022-05-17 17:42:47 +02:00
|
|
|
runs-on: ubuntu-latest
|
2020-11-22 22:31:03 +01:00
|
|
|
if: "!contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')"
|
2020-11-02 22:09:05 +01:00
|
|
|
|
|
|
|
container:
|
2023-09-04 21:43:16 +02:00
|
|
|
image: ghcr.io/void-linux/void-buildroot-${{ matrix.config.libc }}:20230904R2
|
2023-08-12 22:53:14 +02:00
|
|
|
options: --platform ${{ matrix.config.platform }}
|
2020-11-02 22:09:05 +01:00
|
|
|
env:
|
2022-10-09 07:49:22 +02:00
|
|
|
PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
|
2020-11-02 22:09:05 +01:00
|
|
|
ARCH: '${{ matrix.config.arch }}'
|
2023-08-12 22:53:14 +02:00
|
|
|
BOOTSTRAP: '${{ matrix.config.host }}'
|
2020-11-28 19:47:04 +01:00
|
|
|
TEST: '${{ matrix.config.test }}'
|
2020-11-02 22:09:05 +01:00
|
|
|
HOSTREPO: /hostrepo
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
2023-08-12 22:53:14 +02:00
|
|
|
- { arch: x86_64, host: x86_64, libc: glibc, platform: linux/amd64, test: 1 }
|
|
|
|
- { arch: i686, host: i686, libc: glibc, platform: linux/386, test: 1 }
|
|
|
|
- { arch: aarch64, host: x86_64, libc: glibc, platform: linux/amd64, test: 0 }
|
|
|
|
- { arch: armv7l, host: x86_64, libc: glibc, platform: linux/amd64, test: 0 }
|
|
|
|
- { arch: x86_64-musl, host: x86_64-musl, libc: musl, platform: linux/amd64, test: 1 }
|
|
|
|
- { arch: armv6l-musl, host: x86_64-musl, libc: musl, platform: linux/amd64, test: 0 }
|
|
|
|
- { arch: aarch64-musl, host: x86_64-musl, libc: musl, platform: linux/amd64, test: 0 }
|
2020-11-02 22:09:05 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Prepare container
|
|
|
|
run: |
|
2022-08-05 23:06:21 +02:00
|
|
|
# switch to repo-ci mirror
|
|
|
|
mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
|
|
|
|
sed -i 's|repo-default|repo-ci|g' /etc/xbps.d/*-repository-*.conf
|
2020-11-02 22:09:05 +01:00
|
|
|
# Sync and upgrade once, assume error comes from xbps update
|
|
|
|
xbps-install -Syu || xbps-install -yu xbps
|
|
|
|
# Upgrade again (in case there was a xbps update)
|
|
|
|
xbps-install -yu
|
|
|
|
|
2022-12-16 11:00:52 +01:00
|
|
|
- name: Clone and checkout
|
2023-01-28 12:46:52 +01:00
|
|
|
uses: classabbyamp/treeless-checkout-action@v1
|
2021-01-03 21:24:44 +01:00
|
|
|
- name: Create hostrepo and prepare masterdir
|
|
|
|
run: |
|
|
|
|
ln -s "$(pwd)" /hostrepo &&
|
|
|
|
common/travis/set_mirror.sh &&
|
|
|
|
common/travis/prepare.sh &&
|
|
|
|
common/travis/fetch-xtools.sh
|
2020-11-02 22:09:05 +01:00
|
|
|
- run: common/travis/changed_templates.sh
|
|
|
|
|
2020-11-28 19:47:04 +01:00
|
|
|
- name: Build and check packages
|
2020-11-02 22:09:05 +01:00
|
|
|
run: |
|
|
|
|
(
|
|
|
|
here="$(pwd)"
|
|
|
|
cd /
|
2020-11-28 19:47:04 +01:00
|
|
|
"$here/common/travis/build.sh" "$BOOTSTRAP" "$ARCH" "$TEST"
|
2020-11-02 22:09:05 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
- name: Show files
|
|
|
|
run: |
|
|
|
|
(
|
|
|
|
here="$(pwd)"
|
|
|
|
cd /
|
|
|
|
"$here/common/travis/show_files.sh" "$BOOTSTRAP" "$ARCH"
|
|
|
|
)
|
2020-12-18 18:53:10 +01:00
|
|
|
|
2022-04-18 20:57:36 +02:00
|
|
|
- name: Compare to previous
|
|
|
|
run: |
|
|
|
|
(
|
|
|
|
here="$(pwd)"
|
|
|
|
cd /
|
|
|
|
"$here/common/travis/xpkgdiff.sh" "$BOOTSTRAP" "$ARCH"
|
|
|
|
)
|
|
|
|
|
2022-05-04 21:44:51 +02:00
|
|
|
- name: Check file conflicts
|
|
|
|
if: matrix.config.arch == 'x86_64' # the arch indexed in xlocate
|
|
|
|
run: |
|
2022-05-10 18:58:53 +02:00
|
|
|
if [ -s /tmp/templates ]; then
|
|
|
|
xlocate -S &&
|
|
|
|
common/scripts/lint-conflicts $HOME/hostdir/binpkgs
|
|
|
|
fi
|
2022-05-04 21:44:51 +02:00
|
|
|
|
2020-12-18 18:53:10 +01:00
|
|
|
- name: Verify repository state
|
|
|
|
run: |
|
|
|
|
(
|
|
|
|
here="$(pwd)"
|
|
|
|
cd /
|
|
|
|
"$here/common/travis/check-install.sh" "$BOOTSTRAP" "$ARCH"
|
|
|
|
)
|