From bf79b0977cf237b67bf892388eb1318be2abd0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Mon, 2 Nov 2020 18:09:05 -0300 Subject: [PATCH 1/2] .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 ubuntu-20.04 --- .github/workflows/build.yaml | 85 ++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000000..c9423066aa1 --- /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-20.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-20.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 }}:2019102301' + 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 (catches xbps updates) + xbps-install -Syu + # Upgrade again (in case of an 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" + ) From bbe3e7175fc7c6330139e83b7d5e76f1be477d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Thu, 5 Nov 2020 14:38:25 -0300 Subject: [PATCH 2/2] CONTRIBUTING: update information about ci skip. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a38751f55ec..6efdf4817e0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,7 +49,7 @@ Once you have built your template file or files, the commit message should have If you want to describe your changes in more detail, add an empty line followed by those details ([example](https://github.com/void-linux/void-packages/commit/f1c45a502086ba1952f23ace9084a870ce437bc6)). Pull requests are automatically submitted for Continuous Integration (CI) testing to ensure packages build on various combinations of libc and architecture. -Packages that take longer than 50 minutes to build (for example, Firefox or the Linux kernel) will fail CI and should include `[ci skip]` in the last line of the last commit message in the PR to avoid wasting CI builder time. +Packages that take longer than 120 minutes or need more than 14G of storage to complete their build (for example, Firefox or the Linux kernel) will fail CI and should include `[ci skip]` in the PR title or body (the comment field when the PR is being opened) to avoid wasting CI builder time. Use your best judgment on build times based on your local building experience. If you skip CI when submitting a PR, please build and cross-build for a variety of architectures locally, with both glibc and musl, and note your local results in PR comments. Make sure to cover 64-bit and 32-bit architectures.