CI Cleanup #201
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: MLSPP CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
env: | ||
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake | ||
CMAKE_BUILD_PARALLEL_LEVEL: 3 | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
VCPKG_BINARY_SOURCES: files,${{ github.workspace }}/vcpkg_cache,readwrite | ||
VCPKG_REPO: ${{ github.workspace }}/vcpkg | ||
CACHE_VERSION: v01 | ||
CACHE_NAME: vcpkg | ||
jobs: | ||
# formatting-check: | ||
# name: Formatting Check | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# | ||
# - name: Run clang-format style check for C/C++ programs | ||
# uses: jidicula/[email protected] | ||
# with: | ||
# clang-format-version: 16 | ||
# include-regex: '^\./(src|include|test|cmd)/.*\.(cpp|h)$' | ||
# fallback-style: 'Mozilla' | ||
build-and-test: | ||
# needs: formatting-check | ||
name: Build and Test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
crypto: [openssl_1.1, openssl_3, boringssl] | ||
include: | ||
- os: windows-latest | ||
ctest-target: RUN_TESTS | ||
- os: ubuntu-latest | ||
ctest-target: test | ||
- os: macos-latest | ||
ctest-target: test | ||
- os: macos-latest | ||
ctest-target: test | ||
macosx-deployment_target: 10.11 | ||
env: | ||
BUILD_DIR: ${{ env.RUNNER_TEMP }}/build_${{ matrix.crypto }} | ||
Check failure on line 55 in .github/workflows/main_ci.yml GitHub Actions / MLSPP CIInvalid workflow file
|
||
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx-deployment_target }} | ||
steps: | ||
- name: Checkout repository and submodules | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- run: | | ||
git -C ${{ env.VCPKG_REPO }} rev-parse HEAD > vcpkg_commit.txt | ||
- name: Restore Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ github.workspace }}/build/cache | ||
key: ${{ env.CACHE_VERSION }}-${{ env.CACHE_NAME }}-${{ matrix.os }}-${{ hashFiles('vcpkg_commit.txt', 'alternatives/**/vcpkg.json') }}-${{ matrix.macosx-deployment_target }} | ||
restore-keys: | | ||
${{ env.CACHE_VERSION }}-${{ env.CACHE_NAME }}-${{ matrix.os }} | ||
- name: Dependencies (macOS) | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
run: | | ||
brew install llvm pkg-config nasm | ||
ln -s "/usr/local/opt/llvm/bin/clang-format" "/usr/local/bin/clang-format" | ||
ln -s "/usr/local/opt/llvm/bin/clang-tidy" "/usr/local/bin/clang-tidy" | ||
- name: Dependencies (Ubuntu) | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
run: | | ||
sudo apt-get install -y linux-headers-$(uname -r) nasm | ||
- name: Build | ||
run: | | ||
cmake -B "${{ env.BUILD_DIR }}" -DTESTING=ON -DVCPKG_MANIFEST_DIR="alternatives/${{ matrix.crypto }}" | ||
cmake --build "${{ env.BUILD_DIR }}" | ||
- name: Unit Tests | ||
run: | | ||
cmake --build "${{ env.BUILD_DIR }}" --target "${{ matrix.ctest-target}}" | ||
- name: Build (Interop Harness) | ||
run: | | ||
cd cmd/interop | ||
cmake -B build | ||
cmake --build build | ||
- name: Test self-interop | ||
run: | | ||
make -C cmd/interop self-test | ||
- name: Test interop on test vectors | ||
run: | | ||
make -C cmd/interop interop-test | ||
- name: Test gRPC live interop with self | ||
run: | | ||
cd cmd/interop | ||
./grpc-self-test.sh | ||
clang-tidy: | ||
if: github.event.pull_request.draft == false | ||
needs: build-and-test | ||
name: Build with clang-tidy | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
crypto: [openssl_1.1, openssl_3, boringssl] | ||
ctest-target: [test] | ||
steps: | ||
# TODO Build with clang-tidy | ||
- name: Checkout repository and submodules | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||