mirror of
https://github.com/neovim/neovim.git
synced 2026-06-16 16:51:19 +00:00
Bumps the github-actions group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [github/codeql-action](https://github.com/github/codeql-action). Updates `actions/checkout` from 6.0.2 to 6.0.3 - [Release notes](https://github.com/actions/checkout/releases) - [Commits](https://github.com/actions/checkout/compare/v6.0.2...v6.0.3) Updates `github/codeql-action` from 4.36.0 to 4.36.1 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v4.36.0...v4.36.1) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action dependency-version: 4.36.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
93 lines
2.8 KiB
YAML
93 lines
2.8 KiB
YAML
name: build
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
- 'release-[0-9]+.[0-9]+'
|
|
paths:
|
|
- '**.cmake'
|
|
- '**/CMakeLists.txt'
|
|
- '**/CMakePresets.json'
|
|
- 'cmake.*/**'
|
|
- '.github/**'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
env:
|
|
BIN_DIR: ${{ github.workspace }}/bin
|
|
INSTALL_PREFIX: ${{ github.workspace }}/nvim-install
|
|
|
|
jobs:
|
|
# Test the minimum supported cmake.
|
|
old-cmake:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
env:
|
|
CMAKE_URL: 'https://cmake.org/files/v3.16/cmake-3.16.0-Linux-x86_64.sh'
|
|
CMAKE_VERSION: '3.16.0'
|
|
steps:
|
|
- uses: actions/checkout@v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: ./.github/actions/setup
|
|
|
|
- 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
|
|
run: make CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX"
|
|
|
|
- name: Install
|
|
run: make install
|
|
|
|
# Offline build (USE_EXISTING_SRC_DIR=ON with no network access)
|
|
use-existing-src:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: ./.github/actions/setup
|
|
|
|
- name: Build bundled dependencies
|
|
run: make deps
|
|
|
|
# Hint: this is equivalent to the files commmited in: https://github.com/neovim/deps/tree/master/src
|
|
- 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: |
|
|
sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0
|
|
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"
|