Skip to content

Commit

Permalink
Move the clang-format check from CircleCI to GitHub actions.
Browse files Browse the repository at this point in the history
Related to #248.


Signed-off-by: thb-sb <[email protected]>
  • Loading branch information
thb-sb committed Mar 20, 2024
1 parent 37769c9 commit 230dd8a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 19 deletions.
14 changes: 0 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,19 +240,6 @@ jobs:
fi
fi
check-clang-format:
docker:
- image: cimg/base:2022.12
steps:
- run:
name: Install dependencies
command: sudo apt-get update && sudo apt-get install -y clang-format
- checkout
- run:
name: Check coding style using clang-format
command: |
find . -type f -and '(' -name '*.h' -or -name '*.c' -or -name '*.inc' ')' | xargs clang-format --dry-run --Werror
trigger-downstream-ci:
docker:
- image: cimg/base:2020.01
Expand All @@ -277,7 +264,6 @@ workflows:
version: 2.1
build:
jobs:
- check-clang-format
- ubuntu:
name: ubuntu-focal
IMAGE: openquantumsafe/ci-ubuntu-focal-x86_64:latest
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,26 @@ on:
branches: [ "main" ]

jobs:
check_clang_format:
name: "Coding style"
runs-on: ubuntu-latest
strategy:
fail-fast: false
container:
image: openquantumsafe/ci-ubuntu-jammy:latest
steps:
- name: Install dependencies
run: apt-get update && apt-get install -y clang-format

- name: Checkout code
uses: actions/checkout@v2

- name: Check coding style using clang-format
run: find . -type f -and '(' -name '*.h' -or -name '*.c' -or -name '*.inc' ')' | xargs clang-format --dry-run --Werror

linux_baseline:
runs-on: ubuntu-latest
needs: [check_clang_format]
strategy:
fail-fast: false
matrix:
Expand All @@ -30,6 +47,7 @@ jobs:

linux_intel:
runs-on: ubuntu-latest
needs: [check_clang_format]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -79,6 +97,7 @@ jobs:
asan_linux_intel:
name: "Security checks"
runs-on: ubuntu-latest
needs: [check_clang_format]
strategy:
fail-fast: false
container:
Expand Down Expand Up @@ -154,6 +173,7 @@ jobs:
linux_aarch64:
name: "aarch64 cross-compilation"
runs-on: ubuntu-latest
needs: [check_clang_format]
strategy:
fail-fast: false
container:
Expand Down Expand Up @@ -238,3 +258,4 @@ jobs:
with:
name: oqsprovider-aarch64
path: build/*.deb

2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
key: ${{ runner.os }}-openssl32
- name: build liboqs
run: |
cmake -DOPENSSL_ROOT_DIR=../.localopenssl32 -DCMAKE_INSTALL_PREFIX=../.localliboqs ${{ matrix.params.oqsconfig }} -S . -B _build
cmake -DOPENSSL_ROOT_DIR=../.localopenssl32 -DCMAKE_INSTALL_PREFIX=../.localliboqs ${{ matrix.params.oqsconfig }} -S . -B _build
cmake --build _build
cmake --install _build
working-directory: liboqs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ '*' ]
pull_request:
branches: [ "main" ]

jobs:

standalone_macos_intel:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ jobs:
- arch: win64
oqsconfig: -DOQS_ALGS_ENABLED=STD
osslconfig: no-shared no-fips VC-WIN64A
toolchain:
toolchain:
- .CMake/toolchain_windows_amd64.cmake
msarch:
- x64
Expand Down Expand Up @@ -261,7 +261,7 @@ jobs:
run: |
cmake --version
cmake -B build --toolchain ${{ matrix.toolchain }} .
cmake --build build
cmake --build build
cmake --build build --target INSTALL
working-directory: liboqs
- name: prepare the OpenSSL build directory
Expand Down Expand Up @@ -305,4 +305,4 @@ jobs:
with:
name: oqs-provider-msvc
path: D:/a/oqs-provider/oqs-provider/_build/lib/oqsprovider.dll

0 comments on commit 230dd8a

Please sign in to comment.