From ab8e3c59c670317380479497c4faa1bd894671d2 Mon Sep 17 00:00:00 2001 From: Ning Shang Date: Wed, 18 Oct 2023 10:00:47 -0700 Subject: [PATCH] GHA: Merge sanity checks workflows (#38) Merge shellcheck and build test into one workflow file. --- .github/workflows/build-libg2hec.yml | 33 --------------- .../workflows/{shellcheck.yml => sanity.yml} | 41 +++++++++++++++---- 2 files changed, 32 insertions(+), 42 deletions(-) delete mode 100644 .github/workflows/build-libg2hec.yml rename .github/workflows/{shellcheck.yml => sanity.yml} (52%) diff --git a/.github/workflows/build-libg2hec.yml b/.github/workflows/build-libg2hec.yml deleted file mode 100644 index 0e98ce6..0000000 --- a/.github/workflows/build-libg2hec.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: "Build" -on: - push: - branches: - - master - pull_request: - branches: - - master -jobs: - build-libg2hec-linux: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04] - compiler_c: [gcc, clang] - compiler_cxx: [g++, clang++] - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install dependencies - run: | - sudo apt update - sudo apt install -y texinfo - sudo apt install -y texlive-latex-extra - sudo apt install -y autotools-dev autoconf build-essential bear - - name: Build - env: - CC: ${{ matrix.compiler_c }} - CXX: ${{ matrix.compiler_cxx }} - run: | - cd ${{ github.workspace }} - autoreconf -vi - ./scripts/build.sh distcheck diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/sanity.yml similarity index 52% rename from .github/workflows/shellcheck.yml rename to .github/workflows/sanity.yml index 99d3eb2..c8bc1c3 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/sanity.yml @@ -1,16 +1,39 @@ -# Shellcheck: Opinionated shell script analysis -name: "Shellcheck" - -on: +name: Sanity Checks +on: push: - branches: [master] + branches: + - master pull_request: - # The branches below must be a subset of the branches above - branches: [master] - + branches: + - master jobs: + build-libg2hec-linux: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + compiler_c: [gcc, clang] + compiler_cxx: [g++, clang++] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install dependencies + run: | + sudo apt update + sudo apt install -y texinfo + sudo apt install -y texlive-latex-extra + sudo apt install -y autotools-dev autoconf build-essential bear + - name: Build + env: + CC: ${{ matrix.compiler_c }} + CXX: ${{ matrix.compiler_cxx }} + run: | + cd ${{ github.workspace }} + autoreconf -vi + ./scripts/build.sh distcheck + shellcheck: - name: "shellcheck" + name: 'shellcheck' strategy: fail-fast: false # Run on Linux and macos