aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-02-12 18:08:37 +0100
committerGitHub <noreply@github.com>2023-02-12 18:08:37 +0100
commit477d4bbf5f01e5c001a887ed6842e56b5341e976 (patch)
treee887e1de4121451c7d0a386708d4d832bb0da453 /.github/workflows/ci.yml
parent47638706a37534ae9bc7ac4c57ddb9fb2b44fef0 (diff)
downloadrneovim-477d4bbf5f01e5c001a887ed6842e56b5341e976.tar.gz
rneovim-477d4bbf5f01e5c001a887ed6842e56b5341e976.tar.bz2
rneovim-477d4bbf5f01e5c001a887ed6842e56b5341e976.zip
ci: inline external environment scripts (#22237)
Scripts that define the build itself shouldn't be external as they lead to hard to find bugs.
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml51
1 files changed, 33 insertions, 18 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b80220b2c0..f49b54216d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,7 +16,16 @@ concurrency:
cancel-in-progress: true
env:
- UNCRUSTIFY_VERSION: uncrustify-0.75.0
+ ASAN_OPTIONS: detect_leaks=1:check_initialization_order=1:handle_abort=1:handle_sigill=1:log_path=${{ github.workspace }}/build/log/asan:intercept_tls_get_addr=0
+ BIN_DIR: ${{ github.workspace }}/bin
+ BUILD_DIR: ${{ github.workspace }}/build
+ DEPS_BUILD_DIR: ${{ github.workspace }}/nvim-deps
+ INSTALL_PREFIX: ${{ github.workspace }}/nvim-install
+ LOG_DIR: ${{ github.workspace }}/build/log
+ NVIM_LOG_FILE: ${{ github.workspace }}/build/.nvimlog
+ TSAN_OPTIONS: log_path=${{ github.workspace }}/build/log/tsan
+ UBSAN_OPTIONS: "print_stacktrace=1 log_path=${{ github.workspace }}/build/log/ubsan"
+ VALGRIND_LOG: ${{ github.workspace }}/build/log/valgrind-%p.log
# TEST_FILE: test/functional/core/startup_spec.lua
# TEST_FILTER: foo
@@ -25,12 +34,12 @@ 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:
+ CACHE_UNCRUSTIFY: ${{ github.workspace }}/.cache/uncrustify
+ UNCRUSTIFY_VERSION: uncrustify-0.75.0
steps:
- uses: actions/checkout@v3
- - name: Setup common environment variables
- run: ./.github/workflows/env.sh lint
-
- name: Install apt packages
run: |
./.github/scripts/install_deps_ubuntu.sh
@@ -58,7 +67,7 @@ jobs:
build_dir=uncrustify/build
cmake -S $source_dir -B $build_dir -G Ninja -D CMAKE_BUILD_TYPE=Release
cmake --build $build_dir
- mkdir -p $CACHE_DIR
+ mkdir -p .cache
cp $build_dir/uncrustify ${{ env.CACHE_UNCRUSTIFY }}
- uses: ./.github/actions/cache
@@ -120,9 +129,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- - name: Setup common environment variables
- run: ./.github/workflows/env.sh lintc
-
- name: Install apt packages
run: |
sudo add-apt-repository ppa:neovim-ppa/stable
@@ -183,14 +189,15 @@ jobs:
- flavor: asan
cc: clang
runner: ubuntu-22.04
- sanitizer_flags: -D CLANG_ASAN_UBSAN=ON
+ flags: -D CLANG_ASAN_UBSAN=ON
- flavor: tsan
cc: clang
runner: ubuntu-22.04
- sanitizer_flags: -D CLANG_TSAN=ON
+ flags: -D CLANG_TSAN=ON
- flavor: uchar
cc: gcc
runner: ubuntu-22.04
+ flags: -D UNSIGNED_CHAR=ON
- cc: clang
runner: macos-12
@@ -201,6 +208,7 @@ jobs:
cc: gcc
runner: ubuntu-22.04
deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON
+ flags: -D PREFER_LUA=ON
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
env:
@@ -210,8 +218,8 @@ jobs:
- name: Set up environment
run: |
- ./.github/workflows/env.sh ${{ matrix.flavor }}
ulimit -c unlimited
+ echo "$BIN_DIR" >> $GITHUB_PATH
- name: Create log dir
run: mkdir -p "$LOG_DIR"
@@ -244,6 +252,8 @@ jobs:
perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION'
fi
+ - run: echo "DEPS_BUILD_DIR=$HOME/nvim-deps" >> $GITHUB_ENV
+
- uses: ./.github/actions/cache
- name: Build third-party deps
@@ -253,7 +263,7 @@ jobs:
- name: Build
run: |
- cmake -B build -G Ninja $CMAKE_FLAGS ${{ matrix.sanitizer_flags }}
+ cmake -B build -G Ninja -D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX -D MIN_LOG_LEVEL=3 ${{ matrix.flags }}
cmake --build build
- if: "!cancelled()"
@@ -357,8 +367,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- - name: Setup common environment variables
- run: ./.github/workflows/env.sh old_cmake
+ - name: Set up environment
+ run: echo "$BIN_DIR" >> $GITHUB_PATH
- name: Install apt packages
run: ./.github/scripts/install_deps_ubuntu.sh
@@ -390,16 +400,21 @@ jobs:
windows:
runs-on: windows-2019
timeout-minutes: 45
- env:
- DEPS_BUILD_DIR: ${{ github.workspace }}/nvim-deps
- name: windows (MSVC_64)
+ name: windows
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/cache
- name: Set env
- run: ./.github/workflows/env.ps1
+ run: |
+ $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
+ }
+ }
- name: Build deps
run: |