diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2022-11-05 22:57:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 22:57:11 +0100 |
commit | 9a52a8e1ec9de8542510d66a6674742f0dbec27d (patch) | |
tree | ea92dbe84353548f1c7746654f92b64a915b1b6b /.github/workflows | |
parent | 83ea9e23a23408ee2bfbfbae01f081de011dc49b (diff) | |
download | rneovim-9a52a8e1ec9de8542510d66a6674742f0dbec27d.tar.gz rneovim-9a52a8e1ec9de8542510d66a6674742f0dbec27d.tar.bz2 rneovim-9a52a8e1ec9de8542510d66a6674742f0dbec27d.zip |
ci: remove ci/build.ps1 (#20891)
Main benefit is that this will return the correct exit code by default,
meaning the lengthy workarounds to properly fail a test aren't needed.
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/ci.yml | 47 | ||||
-rw-r--r-- | .github/workflows/env.ps1 | 7 | ||||
-rw-r--r-- | .github/workflows/release.yml | 10 |
3 files changed, 54 insertions, 10 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 732e3bb8c1..c4f7f9da36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -339,16 +339,41 @@ jobs: - uses: actions/cache@v3 with: path: ${{ env.DEPS_BUILD_DIR }} - key: windows-${{ hashFiles('cmake.deps/**', 'ci/build.ps1') }} + key: windows-${{ hashFiles('cmake.deps/**') }} + + - name: Set env + run: ./.github/workflows/env.ps1 - name: Build deps - run: .\ci\build.ps1 -BuildDeps + run: | + cmake -S cmake.deps -B $env:DEPS_BUILD_DIR -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' + cmake --build $env:DEPS_BUILD_DIR - name: Build nvim - run: .\ci\build.ps1 -Build + run: | + cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' -DDEPS_PREFIX="$env:DEPS_PREFIX" + cmake --build build - name: Install test deps - run: .\ci\build.ps1 -EnsureTestDeps + run: | + & build\bin\nvim.exe "--version" + + # Ensure that the "win32" feature is set. + & build\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"' + + python -m pip install pynvim + # Sanity check + python -c "import pynvim; print(str(pynvim))" + + gem.cmd install --pre neovim + Get-Command -CommandType Application neovim-ruby-host.bat + + node --version + npm.cmd --version + + npm.cmd install -g neovim + Get-Command -CommandType Application neovim-node-host.cmd + npm.cmd link neovim - if: "!cancelled()" name: Determine if run should be aborted @@ -357,9 +382,15 @@ jobs: "status=${{ job.status }}" >> $env:GITHUB_OUTPUT - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Run tests - run: .\ci\build.ps1 -Test + name: Run functionaltests + run: cmake --build build --target functionaltest - if: success() || failure() && steps.abort_job.outputs.status == 'success' - name: Run old tests - run: .\ci\build.ps1 -TestOld + name: Run oldtests + run: | + # Add MSYS to path, required for e.g. `find` used in test scripts. + # But would break functionaltests, where its `more` would be used then. + $OldPath = $env:PATH + $env:PATH = "C:\msys64\usr\bin;$env:PATH" + & "C:\msys64\mingw64\bin\mingw32-make.exe" -C $(Convert-Path src\nvim\testdir) VERBOSE=1 + $env:PATH = $OldPath diff --git a/.github/workflows/env.ps1 b/.github/workflows/env.ps1 new file mode 100644 index 0000000000..8ac267f2f9 --- /dev/null +++ b/.github/workflows/env.ps1 @@ -0,0 +1,7 @@ +$installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath +if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) { + & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object { + $name, $value = $_ -split '=', 2 + "$name=$value" >> $env:GITHUB_ENV + } +} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1444109eae..1c033fc1dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -150,10 +150,16 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Set env + run: ./.github/workflows/env.ps1 - name: Build deps - run: .\ci\build.ps1 -BuildDeps + run: | + cmake -S cmake.deps -B $env:DEPS_BUILD_DIR -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' + cmake --build $env:DEPS_BUILD_DIR - name: build package - run: .\ci\build.ps1 -Package + run: | + cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' -DDEPS_PREFIX="$env:DEPS_PREFIX" + cmake --build build --target package - uses: actions/upload-artifact@v3 with: name: nvim-win64 |