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
|
|
|
|
|
|
|
jobs:
|
|
|
|
# Lint changed templates.
|
|
|
|
xlint:
|
|
|
|
name: Lint templates
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
|
|
|
|
env:
|
|
|
|
PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
|
|
|
|
XLINT: '1'
|
|
|
|
LICENSE_LIST: common/travis/license.lst
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
fetch-depth: 200
|
|
|
|
- run: common/travis/fetch_upstream.sh
|
|
|
|
- run: common/travis/changed_templates.sh
|
2021-05-22 00:14:56 +02:00
|
|
|
- run: common/travis/fetch-xbps.sh
|
2020-11-02 22:09:05 +01:00
|
|
|
- run: common/travis/fetch-xtools.sh
|
|
|
|
- run: common/travis/xlint.sh
|
|
|
|
|
|
|
|
# Build changed packages.
|
|
|
|
build:
|
|
|
|
name: Build packages
|
|
|
|
runs-on: ubuntu-18.04
|
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:
|
2021-03-13 11:35:12 +01:00
|
|
|
image: 'ghcr.io/void-linux/xbps-src-masterdir:20210313rc01-${{ matrix.config.bootstrap }}'
|
2020-11-02 22:09:05 +01:00
|
|
|
env:
|
|
|
|
PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
|
|
|
|
ARCH: '${{ matrix.config.arch }}'
|
|
|
|
BOOTSTRAP: '${{ matrix.config.bootstrap }}'
|
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:
|
2020-11-28 19:47:04 +01:00
|
|
|
- { arch: x86_64, bootstrap: x86_64, test: 1 }
|
|
|
|
- { arch: i686, bootstrap: i686, test: 1 }
|
|
|
|
- { arch: aarch64, bootstrap: x86_64, test: 0 }
|
|
|
|
- { arch: armv7l, bootstrap: x86_64, test: 0 }
|
|
|
|
- { arch: x86_64-musl, bootstrap: x86_64-musl, test: 1 }
|
|
|
|
- { arch: armv6l-musl, bootstrap: x86_64-musl, test: 0 }
|
|
|
|
- { arch: aarch64-musl, bootstrap: x86_64-musl, test: 0 }
|
2020-11-02 22:09:05 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Prepare container
|
|
|
|
run: |
|
|
|
|
# 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
|
|
|
|
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
fetch-depth: 200
|
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_upstream.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
|
|
|
|
|
|
|
- name: Verify repository state
|
|
|
|
run: |
|
|
|
|
(
|
|
|
|
here="$(pwd)"
|
|
|
|
cd /
|
|
|
|
"$here/common/travis/check-install.sh" "$BOOTSTRAP" "$ARCH"
|
|
|
|
)
|