From 74f8196935a83879c64caff87090ac7341ed5726 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 18 Apr 2021 22:04:46 -0400 Subject: [PATCH 1/4] ci(gha): Update to clang-12 --- .github/workflows/ci.yml | 6 +++--- .github/workflows/env.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd90aeb932..9ea8f77563 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: matrix: include: - flavor: asan - cc: clang-11 + cc: clang-12 runner: ubuntu-20.04 os: linux - flavor: lint @@ -42,7 +42,7 @@ jobs: if: matrix.flavor == 'asan' || matrix.flavor == 'tsan' run: | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - - sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' + sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main' - name: Install apt packages if: matrix.os == 'linux' @@ -52,7 +52,7 @@ jobs: - name: Install new clang if: matrix.flavor == 'asan' || matrix.flavor == 'tsan' - run: sudo apt-get install -y clang-11 + run: sudo apt-get install -y clang-12 - name: Install brew packages if: matrix.os == 'osx' diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh index cc1cef5cc4..459ed669eb 100755 --- a/.github/workflows/env.sh +++ b/.github/workflows/env.sh @@ -34,7 +34,7 @@ case "$FLAVOR" in BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON" cat <> "$GITHUB_ENV" CLANG_SANITIZER=ASAN_UBSAN -SYMBOLIZER=asan_symbolize-11 +SYMBOLIZER=asan_symbolize-12 ASAN_OPTIONS=detect_leaks=1:check_initialization_order=1:log_path=$GITHUB_WORKSPACE/build/log/asan UBSAN_OPTIONS=print_stacktrace=1 log_path=$GITHUB_WORKSPACE/build/log/ubsan EOF From 9a01833d904af14c21a0f2455af5126a66280d55 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 18 Apr 2021 22:08:53 -0400 Subject: [PATCH 2/4] ci(gha): Simplify clang installation --- .github/workflows/ci.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ea8f77563..e7a8625378 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,12 +38,6 @@ jobs: - name: Setup commom environment variables run: ./.github/workflows/env.sh ${{ matrix.flavor }} - - name: Setup clang repository - if: matrix.flavor == 'asan' || matrix.flavor == 'tsan' - run: | - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - - sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main' - - name: Install apt packages if: matrix.os == 'linux' run: | @@ -52,7 +46,11 @@ jobs: - name: Install new clang if: matrix.flavor == 'asan' || matrix.flavor == 'tsan' - run: sudo apt-get install -y clang-12 + run: | + wget https://apt.llvm.org/llvm.sh + chmod a+x llvm.sh + sudo ./llvm.sh 12 + rm llvm.sh - name: Install brew packages if: matrix.os == 'osx' From 491708c9892843fa9013334b4cd130bd0ca41d1b Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 20 Apr 2021 22:57:41 -0400 Subject: [PATCH 3/4] ci(gha/win): Specify valid directory for DEPS_BUILD_DIR --- .github/workflows/ci.yml | 6 +++--- .github/workflows/release.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7a8625378..2f2b3f102f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,8 +89,8 @@ jobs: runs-on: windows-2016 if: github.event.pull_request.draft == false env: - DEPS_BUILD_DIR: "C:/projects/nvim-deps" - DEPS_PREFIX: "C:/projects/nvim-deps/usr" + DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }} + DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }} strategy: fail-fast: false @@ -102,7 +102,7 @@ jobs: - uses: actions/cache@v2 with: - path: C:\projects\nvim-deps + path: ${{ env.DEPS_BUILD_DIR }} key: ${{ matrix.config }}-${{ hashFiles('third-party\**') }} - name: Run CI diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43fe1d5101..24392fb96c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -110,8 +110,8 @@ jobs: windows: runs-on: windows-2016 env: - DEPS_BUILD_DIR: "C:/projects/nvim-deps" - DEPS_PREFIX: "C:/projects/nvim-deps/usr" + DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }} + DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }} strategy: matrix: include: From 62df537543bfc4327700d9f8930ae7c755c92ab2 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Wed, 21 Apr 2021 00:32:38 -0400 Subject: [PATCH 4/4] ci(gha/release): Enable "contents: write" permission to publish release --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 24392fb96c..e5064760d2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -137,6 +137,8 @@ jobs: publish: needs: [linux, appimage, macOS, windows] runs-on: ubuntu-20.04 + permissions: + contents: write steps: - uses: actions/download-artifact@v2 - if: github.event_name == 'workflow_dispatch'