2023-02-18 02:47:22 -07:00
|
|
|
name: build
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- 'master'
|
|
|
|
- 'release-[0-9]+.[0-9]+'
|
|
|
|
paths:
|
|
|
|
- '**.cmake'
|
|
|
|
- '**/CMakeLists.txt'
|
|
|
|
- '**/CMakePresets.json'
|
|
|
|
- 'cmake.*/**'
|
|
|
|
- '.github/**'
|
2024-03-27 06:14:25 -07:00
|
|
|
workflow_dispatch:
|
2023-02-18 02:47:22 -07:00
|
|
|
|
|
|
|
concurrency:
|
2024-03-10 05:49:00 -07:00
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
2023-02-18 02:47:22 -07:00
|
|
|
|
|
|
|
env:
|
|
|
|
BIN_DIR: ${{ github.workspace }}/bin
|
|
|
|
INSTALL_PREFIX: ${{ github.workspace }}/nvim-install
|
|
|
|
|
|
|
|
jobs:
|
2024-04-19 08:04:57 -07:00
|
|
|
wasmtime:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
test: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.test }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: ./.github/actions/setup
|
|
|
|
- run: |
|
|
|
|
cmake -S cmake.deps --preset ci -D ENABLE_WASMTIME=ON
|
|
|
|
cmake --build .deps
|
|
|
|
cmake --preset ci -D ENABLE_WASMTIME=ON
|
|
|
|
cmake --build build
|
|
|
|
|
2023-02-18 02:47:22 -07:00
|
|
|
old-cmake:
|
|
|
|
name: Test oldest supported cmake
|
2024-05-11 03:24:10 -07:00
|
|
|
runs-on: ubuntu-latest
|
2023-02-18 02:47:22 -07:00
|
|
|
timeout-minutes: 15
|
|
|
|
env:
|
2023-10-14 04:12:48 -07:00
|
|
|
CMAKE_URL: 'https://cmake.org/files/v3.13/cmake-3.13.0-Linux-x86_64.sh'
|
|
|
|
CMAKE_VERSION: '3.13.0'
|
2023-02-18 02:47:22 -07:00
|
|
|
steps:
|
2023-09-04 05:51:40 -07:00
|
|
|
- uses: actions/checkout@v4
|
2023-11-30 04:05:13 -07:00
|
|
|
- uses: ./.github/actions/setup
|
2023-02-18 02:47:22 -07:00
|
|
|
|
|
|
|
- name: Install minimum required version of cmake
|
|
|
|
run: |
|
|
|
|
curl --retry 5 --silent --show-error --fail -o /tmp/cmake-installer.sh "$CMAKE_URL"
|
|
|
|
mkdir -p "$BIN_DIR" /opt/cmake-custom
|
|
|
|
chmod a+x /tmp/cmake-installer.sh
|
|
|
|
/tmp/cmake-installer.sh --prefix=/opt/cmake-custom --skip-license
|
|
|
|
ln -sfn /opt/cmake-custom/bin/cmake "$BIN_DIR/cmake"
|
|
|
|
cmake_version="$(cmake --version | head -1)"
|
|
|
|
echo "$cmake_version" | grep -qF "cmake version $CMAKE_VERSION" || {
|
|
|
|
echo "Unexpected CMake version: $cmake_version"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
- name: Build dependencies
|
|
|
|
run: make deps
|
|
|
|
|
|
|
|
- name: Build
|
2023-04-07 13:31:04 -07:00
|
|
|
run: make CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX"
|
2023-02-18 02:47:22 -07:00
|
|
|
|
|
|
|
- name: Install
|
|
|
|
run: make install
|
2023-05-22 05:45:11 -07:00
|
|
|
|
|
|
|
use-existing-src:
|
|
|
|
name: Test USE_EXISTING_SRC_DIR=ON builds with no network access
|
2024-05-11 03:24:10 -07:00
|
|
|
runs-on: ubuntu-latest
|
2023-05-22 05:45:11 -07:00
|
|
|
steps:
|
2023-09-04 05:51:40 -07:00
|
|
|
- uses: actions/checkout@v4
|
2023-11-30 04:05:13 -07:00
|
|
|
- uses: ./.github/actions/setup
|
2023-05-22 05:45:11 -07:00
|
|
|
|
|
|
|
- name: Build bundled dependencies
|
|
|
|
run: make deps
|
|
|
|
|
|
|
|
- name: Clean bundled dependencies à la neovim/deps
|
|
|
|
run: |
|
|
|
|
rm -rf ./build
|
|
|
|
find .deps .deps/build -maxdepth 1 '!' \( -name .deps -o -name build -o -name src \) -exec rm -r '{}' +
|
|
|
|
cd .deps/build/src
|
|
|
|
rm -rf ./*-build
|
|
|
|
rm -rf ./*-stamp/*-{configure,build,install,done}
|
|
|
|
for d in *; do (cd "$d"; rm -rf ./autom4te.cache; make clean || true; make distclean || true); done
|
|
|
|
|
|
|
|
- name: Re-build bundled dependencies with no network access
|
|
|
|
run: unshare --map-root-user --net make deps DEPS_CMAKE_FLAGS=-DUSE_EXISTING_SRC_DIR=ON
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: make CMAKE_FLAGS="-D CI_BUILD=ON"
|