ci: refactor build.ps1 #19336

Refactor `build.ps1` into a more modular design

9728f3b558/.github/workflows/ci.yml (L283-L296)

- Separate CI steps.
- Remove unneeded code related to setting up CMake.
- Use parallel/incremental builds.
- Fix github's cache.
- Clear the way for the possibility of replacing this file with a cmake-preset:
  https://github.com/neovim/neovim/pull/19128
This commit is contained in:
kylo252
2022-07-18 00:07:35 +02:00
committed by GitHub
parent 13abe20b5f
commit 9f4b19b6d0
3 changed files with 162 additions and 144 deletions

View File

@@ -269,6 +269,7 @@ jobs:
env:
DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }}
DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }}
CMAKE_BUILD_TYPE: "RelWithDebInfo"
name: windows (MSVC_64)
steps:
- uses: actions/checkout@v3
@@ -278,7 +279,20 @@ jobs:
path: ${{ env.DEPS_BUILD_DIR }}
key: ${{ hashFiles('cmake.deps\**') }}
- name: Run CI
run: powershell ci\build.ps1
env:
CONFIGURATION: MSVC_64
- name: Build deps
run: .\ci\build.ps1 -BuildDeps
- name: Build nvim
run: .\ci\build.ps1 -Build
- name: Install test deps
continue-on-error: false
run: .\ci\build.ps1 -EnsureTestDeps
- if: "!cancelled()"
name: Run tests
run: .\ci\build.ps1 -Test
- if: "!cancelled()"
name: Run old tests
run: .\ci\build.ps1 -TestOld

View File

@@ -138,7 +138,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: powershell ci\build.ps1 -NoTests
- run: powershell ci\build.ps1 -Package
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.archive }}