Skip to content

Commit

Permalink
Linux CI & disable cpplint
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui committed Dec 16, 2023
1 parent 17285ca commit 56cf4fd
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 170 deletions.
135 changes: 0 additions & 135 deletions .github/disabled_workflows/linux.yml

This file was deleted.

70 changes: 35 additions & 35 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@ name: C++

on:
push:
branches: [ main ]
branches: [main]
pull_request:

permissions:
contents: read

jobs:
# clang-tidy:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4
#
# - name: Install dependencies
# run: |
# sudo apt-get -qq update
# sudo apt-get install -y \
# clang-14 lld-14 \
# ninja-build libboost-all-dev \
# libfmt-dev libarchive-dev libgit2-dev libspdlog-dev
#
# - name: Run CMake
# run: cmake -B build -G Ninja
#
# - name: Run clang-tidy
# run: ninja
# working-directory: build
# clang-tidy:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4
#
# - name: Install dependencies
# run: |
# sudo apt-get -qq update
# sudo apt-get install -y \
# clang-14 lld-14 \
# ninja-build libboost-all-dev \
# libfmt-dev libarchive-dev libgit2-dev libspdlog-dev
#
# - name: Run CMake
# run: cmake -B build -G Ninja
#
# - name: Run clang-tidy
# run: ninja
# working-directory: build

format:
runs-on: ubuntu-22.04
Expand All @@ -46,21 +46,21 @@ jobs:
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
poac fmt --check --verbose
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
# lint:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4

- name: Install Poac
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew update
brew install poac
# - name: Install Poac
# run: |
# eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
# brew update
# brew install poac

- name: Install cpplint
run: pip install cpplint
# - name: Install cpplint
# run: pip install cpplint

- name: Run lint
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
poac lint --verbose
# - name: Run lint
# run: |
# eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
# poac lint --verbose
81 changes: 81 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Linux

on:
push:
branches: [main]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

jobs:
build-and-test:
name: "build & test"
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
coverage: [off]
compiler:
- cc: clang-12
cxx: clang++-12
- cc: clang-13
cxx: clang++-13
- cc: clang-14
cxx: clang++-14
- cc: gcc-11
cxx: g++-11
- cc: gcc-12
cxx: g++-12
include:
- build_type: Debug
coverage: on
compiler:
cc: gcc-12
cxx: g++-12
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
steps:
- uses: actions/checkout@v3

- name: Setup GCC
if: startsWith(matrix.compiler.cc, 'gcc')
run: sudo apt-get install -y ${{ matrix.compiler.cxx }}

- name: Setup Clang
if: startsWith(matrix.compiler.cc, 'clang')
run: sudo apt-get install -y ${{ matrix.compiler.cc }}

- name: Build Poac
run: make

- name: Self-build Poac
run: ./build-out/poac build --verbose

- name: Test self-built binary
run: ./poac-out/poac help

# - name: Test Poac
# run: ctest --output-on-failure --verbose
# working-directory: build

# - name: Print coverage
# if: success() && matrix.coverage == 'on'
# run: |
# lcov --directory . --capture --output-file coverage.info --gcov-tool "${CC_PATH/gcc/gcov}"
# lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' --output-file coverage.info
# lcov --list coverage.info
# env:
# CC_PATH: /usr/bin/${{ env.CC }}

# - name: Upload coverage to Codecov
# if: success() && matrix.coverage == 'on'
# uses: codecov/codecov-action@v3
# with:
# files: coverage.info

0 comments on commit 56cf4fd

Please sign in to comment.