aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-02-11 13:27:43 +0100
committerGitHub <noreply@github.com>2023-02-11 13:27:43 +0100
commit883ec20d9f91bde9c348bfcc0e1fcc3e3533cd89 (patch)
tree5af11abce6926bf5c5776131179c8ad234320116 /.github/workflows
parentb0d156c00b3900c8e40cf7f0e76c34b734d50598 (diff)
downloadrneovim-883ec20d9f91bde9c348bfcc0e1fcc3e3533cd89.tar.gz
rneovim-883ec20d9f91bde9c348bfcc0e1fcc3e3533cd89.tar.bz2
rneovim-883ec20d9f91bde9c348bfcc0e1fcc3e3533cd89.zip
ci: inline build commands and remove before_script.sh (#22202)
Abstracting the build commands to a separate script makes it more difficult to reason about it and more error-prone.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml48
-rwxr-xr-x.github/workflows/env.sh8
2 files changed, 37 insertions, 19 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c27100072f..205a8e1615 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,7 +16,6 @@ concurrency:
cancel-in-progress: true
env:
- CI_BUILD_DIR: ${{ github.workspace }}
UNCRUSTIFY_VERSION: uncrustify-0.75.0
# TEST_FILE: test/functional/core/startup_spec.lua
# TEST_FILTER: foo
@@ -26,8 +25,6 @@ jobs:
if: (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on: ubuntu-22.04
timeout-minutes: 10
- env:
- CC: gcc
steps:
- uses: actions/checkout@v3
@@ -67,7 +64,9 @@ jobs:
- uses: ./.github/actions/cache
- name: Build third-party deps
- run: ./ci/before_script.sh
+ run: |
+ cmake -S cmake.deps -B "${DEPS_BUILD_DIR}" -G Ninja ${DEPS_CMAKE_FLAGS}
+ cmake --build "${DEPS_BUILD_DIR}"
- if: "!cancelled()"
name: Determine if run should be aborted
@@ -90,7 +89,7 @@ jobs:
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
name: lintsh
- run: make lintsh
+ run: cmake --build build --target lintsh
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
name: uncrustify
@@ -119,8 +118,6 @@ jobs:
if: (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on: ubuntu-22.04
timeout-minutes: 10
- env:
- CC: gcc
steps:
- uses: actions/checkout@v3
@@ -153,10 +150,14 @@ jobs:
- uses: ./.github/actions/cache
- name: Build third-party deps
- run: ./ci/before_script.sh
+ run: |
+ cmake -S cmake.deps -B "${DEPS_BUILD_DIR}" -G Ninja ${DEPS_CMAKE_FLAGS}
+ cmake --build "${DEPS_BUILD_DIR}"
- - name: Build nvim
- run: make
+ - name: Build
+ run: |
+ cmake -B build -G Ninja
+ cmake --build build
- if: "!cancelled()"
name: Determine if run should be aborted
@@ -226,10 +227,23 @@ jobs:
- uses: ./.github/actions/cache
- name: Build third-party deps
- run: ./ci/before_script.sh
+ run: |
+ if test "${FUNCTIONALTEST}" = "functionaltest-lua" ; then
+ DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -D USE_BUNDLED_LUA=ON"
+ fi
+ cmake -S cmake.deps -B "${DEPS_BUILD_DIR}" -G Ninja ${DEPS_CMAKE_FLAGS}
+ cmake --build "${DEPS_BUILD_DIR}"
- name: Build
- run: ./ci/run_tests.sh build_nvim
+ run: |
+ if test -n "${CLANG_SANITIZER}" ; then
+ CMAKE_FLAGS="${CMAKE_FLAGS} -D CLANG_${CLANG_SANITIZER}=ON"
+ fi
+ cmake -B build -G Ninja ${CMAKE_FLAGS}
+ cmake --build build
+
+ - name: Prepare sanitizer
+ run: ./ci/run_tests.sh prepare_sanitizer
- if: "!cancelled()"
name: Determine if run should be aborted
@@ -251,8 +265,12 @@ jobs:
run: ./ci/run_tests.sh oldtests
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
- name: Install nvim
- run: ./ci/run_tests.sh install_nvim
+ name: Install
+ run: cmake --install build
+
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
+ name: Installtests
+ run: ./ci/run_tests.sh installtests
old_cmake:
name: Test oldest supported cmake
@@ -314,7 +332,7 @@ jobs:
cmake -S cmake.deps -B $env:DEPS_BUILD_DIR -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo'
cmake --build $env:DEPS_BUILD_DIR
- - name: Build nvim
+ - name: Build
run: |
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' -D CI_BUILD=ON
cmake --build build
diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh
index b4cdb3a8d9..4a22c796b4 100755
--- a/.github/workflows/env.sh
+++ b/.github/workflows/env.sh
@@ -3,14 +3,14 @@ set -e -u
FLAVOR=${1:-}
-BUILD_DIR=$CI_BUILD_DIR/build
-BIN_DIR=$CI_BUILD_DIR/bin
+BUILD_DIR=$GITHUB_WORKSPACE/build
+BIN_DIR=$GITHUB_WORKSPACE/bin
DEPS_BUILD_DIR=$HOME/nvim-deps
-INSTALL_PREFIX=$CI_BUILD_DIR/nvim-install
+INSTALL_PREFIX=$GITHUB_WORKSPACE/nvim-install
LOG_DIR=$BUILD_DIR/log
NVIM_LOG_FILE=$BUILD_DIR/.nvimlog
VALGRIND_LOG=$LOG_DIR/valgrind-%p.log
-CACHE_DIR=$CI_BUILD_DIR/.cache
+CACHE_DIR=$GITHUB_WORKSPACE/.cache
CACHE_UNCRUSTIFY=$CACHE_DIR/uncrustify
DEPS_CMAKE_FLAGS=
FUNCTIONALTEST=functionaltest