diff options
author | Érico Rolim <erico.erc@gmail.com> | 2020-11-02 21:09:05 +0000 |
---|---|---|
committer | Érico Nogueira Rolim <34201958+ericonr@users.noreply.github.com> | 2020-11-13 22:33:25 +0000 |
commit | d97410a07ac15313bc4584231e69bc8e57fe7b59 (patch) | |
tree | 5903247a65b7f11140b43f75c25a2001bcfea51e /.github/workflows | |
parent | 71a25f3e735c1fef4178422b1a2bb70ec8e84e02 (diff) | |
download | void-packages-d97410a07ac15313bc4584231e69bc8e57fe7b59.tar void-packages-d97410a07ac15313bc4584231e69bc8e57fe7b59.tar.gz void-packages-d97410a07ac15313bc4584231e69bc8e57fe7b59.tar.bz2 void-packages-d97410a07ac15313bc4584231e69bc8e57fe7b59.tar.lz void-packages-d97410a07ac15313bc4584231e69bc8e57fe7b59.tar.xz void-packages-d97410a07ac15313bc4584231e69bc8e57fe7b59.tar.zst void-packages-d97410a07ac15313bc4584231e69bc8e57fe7b59.zip |
.github/workflows: add build.yaml.
This commit enables CI on GitHub Actions.
Taken from nilium's repository:
https://github.com/nilium/ecks-bops-packages/blob/e9bf829752ab82d1170ceb5da60ad656ef372064/.github/workflows/build.yaml
Plus a few changes:
- only run CI on PRs
- don't run CI on draft PRs or when a PR title or body contains "[ci skip]"
- remove some names
- use more recent void containers
- fix XBPS self update
Diffstat (limited to '.github/workflows')
-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" + ) |