Vim: define "defgroup" #132
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: distcheck | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
# It fails on Windows in "Making check in po", after 80+ minutes. Cannot | |
# replicate locally. | |
# It sometimes fails on ARM64 macOS with "make[4]: *** read jobs pipe: Resource temporarily unavailable. Stop." | |
jobs: | |
distcheck: | |
timeout-minutes: 120 | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- os: linux | |
#- os: macos | |
#- os: windows | |
include: | |
- target: | |
os: linux | |
builder: ubuntu-22.04 | |
shell: bash | |
#- target: | |
#os: macos | |
#builder: macos-latest | |
#shell: bash | |
#- target: | |
#os: windows | |
#builder: windows-2019 | |
#shell: msys2 {0} | |
defaults: | |
run: | |
shell: ${{ matrix.shell }} | |
name: '${{ matrix.target.os }}' | |
runs-on: ${{ matrix.builder }} | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Environment variables | |
shell: bash | |
run: | | |
CFLAGS="-O3 -march=native -pipe" | |
CXXFLAGS="-O3 -march=native -pipe" | |
CPPFLAGS="" | |
LDFLAGS="" | |
NCPU="" | |
MAKE_CMD="make" | |
case "${{ runner.os }}" in | |
"Linux") | |
NCPU="$(nproc)" | |
echo "DEBIAN_FRONTEND=noninteractive" >> ${GITHUB_ENV} | |
echo "TZ=Etc/UTC" >> ${GITHUB_ENV} | |
;; | |
"macOS") | |
NCPU="$(sysctl -n hw.logicalcpu)" | |
CPPFLAGS="${CPPFLAGS} -I/opt/homebrew/opt/gettext/include" | |
LDFLAGS="${LDFLAGS} -L/opt/homebrew/opt/gettext/lib" | |
echo "/opt/homebrew/opt/qt@5/bin" >> ${GITHUB_PATH} | |
echo "/opt/homebrew/opt/gettext/bin" >> ${GITHUB_PATH} | |
echo "PKG_CONFIG_PATH=/opt/homebrew/opt/qt@5/lib/pkgconfig:/opt/homebrew/opt/openssl@1.1/lib/pkgconfig" >> ${GITHUB_ENV} | |
echo "MACOSX_DEPLOYMENT_TARGET=12.0" >> ${GITHUB_ENV} | |
;; | |
"Windows") | |
NCPU="${NUMBER_OF_PROCESSORS}" | |
MAKE_CMD="mingw32-make" | |
# avoid random failure: "aclocal-1.16: error: aclocal: file '/a/_temp/msys64/usr/share/aclocal/tcl.m4' does not exist" | |
echo "ACLOCAL_PATH=/d/a/_temp/msys64/usr/share/aclocal/:${ACLOCAL_PATH}" >> ${GITHUB_ENV} | |
;; | |
esac | |
echo "CFLAGS=${CFLAGS}" >> ${GITHUB_ENV} | |
echo "CXXFLAGS=${CXXFLAGS}" >> ${GITHUB_ENV} | |
echo "CPPFLAGS=${CPPFLAGS}" >> ${GITHUB_ENV} | |
echo "LDFLAGS=${LDFLAGS}" >> ${GITHUB_ENV} | |
[[ -z "${NCPU}" || ${NCPU} -le 0 ]] && NCPU="1" | |
echo "NCPU=${NCPU}" >> ${GITHUB_ENV} | |
echo "MAKE_CMD=${MAKE_CMD}" >> ${GITHUB_ENV} | |
- name: Install build dependencies (Linux AMD64) | |
if: runner.os == 'Linux' | |
run: | | |
sudo -E apt-get update -qq | |
sudo -E eatmydata apt-get install --no-install-recommends -yq \ | |
build-essential \ | |
gettext \ | |
intltool \ | |
libayatana-appindicator3-dev \ | |
libcurl4-openssl-dev \ | |
libglib2.0-dev \ | |
libgtk-3-dev \ | |
libnotify-dev \ | |
libssl-dev \ | |
libsystemd-dev \ | |
qttools5-dev \ | |
xz-utils \ | |
zlib1g-dev | |
- name: Select the Xcode version | |
if: runner.os == 'macOS' | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15' # 14 seems buggy: https://github.com/actions/runner-images/issues/6642 | |
- name: Install build dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew install \ | |
autoconf \ | |
automake \ | |
cmake \ | |
gettext \ | |
gtk+3 \ | |
intltool \ | |
libevent \ | |
libnatpmp \ | |
miniupnpc \ | |
openssl@1.1 \ | |
pkg-config \ | |
qt@5 | |
- name: MSYS2 (Windows amd64) | |
if: runner.os == 'Windows' | |
uses: msys2/setup-msys2@v2 | |
with: | |
path-type: inherit | |
install: >- | |
base-devel | |
intltool | |
mingw-w64-x86_64-cmake | |
mingw-w64-x86_64-curl | |
mingw-w64-x86_64-gtk3 | |
mingw-w64-x86_64-libnotify | |
mingw-w64-x86_64-openssl | |
mingw-w64-x86_64-qt5-base | |
mingw-w64-x86_64-qt5-tools | |
mingw-w64-x86_64-qt5-winextras | |
mingw-w64-x86_64-toolchain | |
mingw-w64-x86_64-xz | |
mingw-w64-x86_64-zlib | |
- name: make distcheck | |
run: | | |
./configure | |
${MAKE_CMD} -j${NCPU} XZ_OPT="-e -T0" V=1 distcheck |