From 1731ef31760ebf9574ff898a67c035bb4051b31f Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 16 Nov 2020 21:14:40 -0500 Subject: GHA: Rename linux workflow to CI --- .github/workflows/ci.yml | 61 +++++++++++++++++++++++++++++++++++++++++++++ .github/workflows/linux.yml | 61 --------------------------------------------- 2 files changed, 61 insertions(+), 61 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/linux.yml (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..b8a8c01137 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,61 @@ +name: Linux CI +on: [push, pull_request] + +jobs: + linux: + name: ${{ matrix.flavor }} (cc=${{ matrix.cc }}) + runs-on: ubuntu-20.04 + strategy: + matrix: + include: + - flavor: asan + cc: clang-11 + - flavor: lint + cc: gcc + - flavor: tsan + cc: clang-11 + env: + CC: ${{ matrix.cc }} + steps: + - uses: actions/checkout@v2 + + - 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-11 main' + + - name: Install apt packages + run: | + sudo apt-get update + sudo apt-get install -y autoconf automake build-essential ccache cmake cpanminus cscope gcc-multilib gdb gettext gperf language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip valgrind xclip + + - name: Install new clang + if: matrix.flavor == 'asan' || matrix.flavor == 'tsan' + run: sudo apt-get install -y clang-11 + + - name: Setup interpreter packages + run: | + ./ci/before_install.sh + ./ci/install.sh + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: | + ${{ env.CACHE_NVIM_DEPS_DIR }} + ~/.ccache + key: ${{ runner.os }}-${{ matrix.flavor }}-${{ matrix.cc }}-${{ hashFiles('cmake/*', 'third-party/**', '**/CMakeLists.txt') }}-${{ github.base_ref }} + + - name: Build third-party + run: ./ci/before_script.sh + + - name: Build and test + run: ./ci/script.sh + + - name: Cache dependencies + if: ${{ success() }} + run: ./ci/before_cache.sh diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml deleted file mode 100644 index b8a8c01137..0000000000 --- a/.github/workflows/linux.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Linux CI -on: [push, pull_request] - -jobs: - linux: - name: ${{ matrix.flavor }} (cc=${{ matrix.cc }}) - runs-on: ubuntu-20.04 - strategy: - matrix: - include: - - flavor: asan - cc: clang-11 - - flavor: lint - cc: gcc - - flavor: tsan - cc: clang-11 - env: - CC: ${{ matrix.cc }} - steps: - - uses: actions/checkout@v2 - - - 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-11 main' - - - name: Install apt packages - run: | - sudo apt-get update - sudo apt-get install -y autoconf automake build-essential ccache cmake cpanminus cscope gcc-multilib gdb gettext gperf language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip valgrind xclip - - - name: Install new clang - if: matrix.flavor == 'asan' || matrix.flavor == 'tsan' - run: sudo apt-get install -y clang-11 - - - name: Setup interpreter packages - run: | - ./ci/before_install.sh - ./ci/install.sh - - - name: Cache dependencies - uses: actions/cache@v2 - with: - path: | - ${{ env.CACHE_NVIM_DEPS_DIR }} - ~/.ccache - key: ${{ runner.os }}-${{ matrix.flavor }}-${{ matrix.cc }}-${{ hashFiles('cmake/*', 'third-party/**', '**/CMakeLists.txt') }}-${{ github.base_ref }} - - - name: Build third-party - run: ./ci/before_script.sh - - - name: Build and test - run: ./ci/script.sh - - - name: Cache dependencies - if: ${{ success() }} - run: ./ci/before_cache.sh -- cgit From 0c022c03ee6177480abac92e80f6fd767500ed95 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 16 Nov 2020 21:28:01 -0500 Subject: GHA: Add macOS CI --- .github/workflows/ci.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8a8c01137..099f0b64d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,21 +1,31 @@ -name: Linux CI +name: CI on: [push, pull_request] jobs: - linux: - name: ${{ matrix.flavor }} (cc=${{ matrix.cc }}) - runs-on: ubuntu-20.04 + build: + name: ${{ matrix.os }} ${{ matrix.flavor }} (cc=${{ matrix.cc }}) strategy: matrix: include: - flavor: asan cc: clang-11 + runner: ubuntu-20.04 + os: linux - flavor: lint cc: gcc + runner: ubuntu-20.04 + os: linux - flavor: tsan cc: clang-11 + runner: ubuntu-20.04 + os: linux + - cc: clang + runner: macos-10.15 + os: osx + runs-on: ${{ matrix.runner }} env: CC: ${{ matrix.cc }} + CI_OS_NAME: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -29,6 +39,7 @@ jobs: sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' - name: Install apt packages + if: matrix.os == 'linux' run: | sudo apt-get update sudo apt-get install -y autoconf automake build-essential ccache cmake cpanminus cscope gcc-multilib gdb gettext gperf language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip valgrind xclip -- cgit From 36fe82ff98fe8b8e4658c7fd36f74bc87c869c4c Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 16 Nov 2020 21:32:05 -0500 Subject: env.sh: Handle no flavor being specified --- .github/workflows/env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh index 84f26f949e..d038c4b607 100755 --- a/.github/workflows/env.sh +++ b/.github/workflows/env.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -u -FLAVOR=$1 +FLAVOR=${1:-} cat <> "$GITHUB_PATH" $HOME/.local/bin -- cgit From 0d7777e9bcf483e161f01937a1000dfb57415b73 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 16 Nov 2020 21:57:46 -0500 Subject: GHA: brew required software --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 099f0b64d1..70cdc3b4a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,13 @@ jobs: if: matrix.flavor == 'asan' || matrix.flavor == 'tsan' run: sudo apt-get install -y clang-11 + - name: Install brew packages + if: matrix.os == 'osx' + run: | + brew update >/dev/null + brew install automake ccache cpanminus ninja + brew upgrade + - name: Setup interpreter packages run: | ./ci/before_install.sh -- cgit From 0bb565b13bcc7a199bf997a67b9a6039d584b84e Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 24 Nov 2020 16:50:05 -0500 Subject: GHA: Force CCACHE_DIR=$HOME/.ccache --- .github/workflows/env.sh | 1 + 1 file changed, 1 insertion(+) (limited to '.github/workflows') diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh index d038c4b607..cc1cef5cc4 100755 --- a/.github/workflows/env.sh +++ b/.github/workflows/env.sh @@ -24,6 +24,7 @@ DEPS_CMAKE_FLAGS=-DUSE_BUNDLED_GPERF=OFF FUNCTIONALTEST=functionaltest CCACHE_COMPRESS=1 CCACHE_SLOPPINESS=time_macros,file_macro +CCACHE_DIR=$HOME/.ccache EOF BUILD_FLAGS="CMAKE_FLAGS=-DCI_BUILD=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=$HOME/nvim-install -DBUSTED_OUTPUT_TYPE=nvim -DDEPS_PREFIX=$HOME/nvim-deps/usr -DMIN_LOG_LEVEL=3" -- cgit