void-packages/.github/workflows/build.yaml
Érico Rolim 55f0c47176 .github/workflows/build: don't skip CI when PR is a draft.
When a PR is marked as ready for review (no longer a draft), CI isn't
re-run automatically, so no tests are run until the PR is updated. Even
trying to manually re-run the jobs doesn't fix this, since GH appears to
remember the PR state instead of using the current one.
2020-11-22 21:56:19 -03:00

85 lines
2.4 KiB
YAML

name: Check PR
on: pull_request
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
- run: common/travis/fetch-xtools.sh
- run: common/travis/xlint.sh
# Build changed packages.
build:
name: Build packages
runs-on: ubuntu-18.04
if: "!contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')"
container:
image: 'voidlinux/masterdir-${{ matrix.config.bootstrap }}:20200607RC01'
env:
PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
ARCH: '${{ matrix.config.arch }}'
BOOTSTRAP: '${{ matrix.config.bootstrap }}'
HOSTREPO: /hostrepo
strategy:
fail-fast: false
matrix:
config:
- { arch: x86_64, bootstrap: x86_64 }
- { arch: i686, bootstrap: i686 }
- { arch: aarch64, bootstrap: x86_64 }
- { arch: armv7l, bootstrap: x86_64 }
- { arch: x86_64-musl, bootstrap: x86_64-musl }
- { arch: armv6l-musl, bootstrap: x86_64-musl }
- { arch: aarch64-musl, bootstrap: x86_64-musl }
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
# Install git
xbps-install -y git
- uses: actions/checkout@v1
with:
fetch-depth: 200
- name: Create hostrepo
run: ln -s "$(pwd)" /hostrepo
- run: common/travis/set_mirror.sh
- run: common/travis/prepare.sh
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- name: Build packages
run: |
(
here="$(pwd)"
cd /
"$here/common/travis/build.sh" "$BOOTSTRAP" "$ARCH"
)
- name: Show files
run: |
(
here="$(pwd)"
cd /
"$here/common/travis/show_files.sh" "$BOOTSTRAP" "$ARCH"
)