diff options
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r-- | .github/workflows/build.yml | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index be0f2f812c..26197cdcd3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,12 @@ name: build on: + push: + paths: + - '**.cmake' + - '**/CMakeLists.txt' + - '**/CMakePresets.json' + - 'cmake.*/**' + - '.github/**' pull_request: branches: - 'master' @@ -12,7 +19,7 @@ on: - '.github/**' concurrency: - group: ${{ github.workflow }}-${{ github.head_ref }} + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.repository_owner == 'neovim' && github.sha || github.ref_name }} cancel-in-progress: true env: @@ -71,3 +78,30 @@ jobs: - name: Install run: make install + + use-existing-src: + name: Test USE_EXISTING_SRC_DIR=ON builds with no network access + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + + - name: Install build dependencies + run: ./.github/scripts/install_deps.sh + + - 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" |