2016-08-11 03:34:27 +08:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2019-06-24 22:01:18 +08:00
|
|
|
# Copyright © 2016-2019 by The qTox Project Contributors
|
2016-08-11 03:34:27 +08:00
|
|
|
#
|
|
|
|
# This program is libre software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2016-08-11 17:51:53 +08:00
|
|
|
#
|
2016-08-11 03:34:27 +08:00
|
|
|
|
|
|
|
# Fail out on error
|
|
|
|
set -eu -o pipefail
|
|
|
|
|
|
|
|
# Verify commit messages
|
chore(ci): Migrate PR CI from travis-ci.org and circleci to GitHub Actions
Partially fix #6345, only PR portion, not nightly or releases.
Unlike travis, we're not caching our brew packages. `actions/cache` doesn't
update the cache on cache hit, making it hard to use a rolling cache like
before. We also don't know what cache key we should use before running, since
it relies on the live package list of brew.
Using a docker image containing brew packages seems like a better option if we
need the speedup going forward. ATM a full build with deps only takes about 12
minutes. Windows builds don't have this issue, since deps there are keyed off of
known versions in our repo.
Current Windows matrix form works, but causes a double-build on dep change due
to both debug/release rebuilding the release deps. Instead, should probably
separate the dep jobs, block build on the dep jobs, and update the cache on dep
jobs, guaranteeing a cache hit on build jobs?
Windows stage 1 and stage 2 can probably be recombined, if they were split due
to travis single build length limits, since GH actions allows much longer single
builds.
2021-06-21 14:56:15 +08:00
|
|
|
readarray -t COMMITS <<<$(curl -s ${GITHUB_CONTEXT} | jq -r '.[0,-1].sha')
|
2022-04-03 10:37:00 +08:00
|
|
|
COMMIT_RANGE="${COMMITS[1]}~1..${COMMITS[0]}"
|
2022-02-17 00:12:10 +08:00
|
|
|
bash ./verify-commit-messages.sh "$COMMIT_RANGE"
|