diff options
Diffstat (limited to '.github/workflows/build.yaml')
-rw-r--r-- | .github/workflows/build.yaml | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000000..8c0cdccf5d4 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,85 @@ +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: "!github.event.pull_request.draft && !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" + ) |