Skip to content

Commit

Permalink
ci: update workflow and disable it by default
Browse files Browse the repository at this point in the history
  • Loading branch information
rmaxi-me authored Dec 29, 2024
1 parent 6a67e47 commit afe6103
Showing 1 changed file with 61 additions and 61 deletions.
122 changes: 61 additions & 61 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
name: C++ Cross-Platform Build
# name: C++ Cross-Platform Build

on: push
# on: push

defaults:
run:
shell: bash
# defaults:
# run:
# shell: bash

jobs:
# jobs:

# template: remove if not using clang-format
clang-format-check:
name: clang-format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# # template: remove if not using clang-format
# clang-format-check:
# name: clang-format check
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout

- name: Run clang-format
uses: jidicula/clang-format-action@v4.6.2
with:
clang-format-version: '14'
# - name: Run clang-format
# uses: jidicula/clang-format-action
# with:
# clang-format-version: '18'

build:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, macos-12, windows-2022 ]
mode: [ "Debug", "Release" ]
# cxx-std: [ 17, 20 ] # template: enable if multiple std version testing is wanted
include:
- os: ubuntu-22.04
#cxx-override: CC=gcc-10 CXX=g++-10
- os: macos-12
- os: windows-2022
pdb-path: ./build/*.pdb
# build:
# strategy:
# fail-fast: false
# matrix:
# os: [ ubuntu-latest, macos-latest, windows-latest ]
# mode: [ "Debug", "Release" ]
# # cxx-std: [ 17, 20, 23 ] # template: enable if multiple std version testing is wanted
# include:
# - os: ubuntu-latest
# #cxx-override: CC=gcc-10 CXX=g++-10
# - os: macos-latest
# - os: windows-latest
# pdb-path: ./build/*.pdb

runs-on: ${{ matrix.os }}
# runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
# steps:
# - uses: actions/checkout
# with:
# submodules: 'recursive'

# template: uncomment if using std::execution stuff for gcc or clang
# - name: apt dependencies
# run: sudo apt update && sudo apt install -y --no-install-recommends libtbb-dev
# if: startsWith(matrix.os, 'ubuntu')
# # template: uncomment if using std::execution stuff for gcc or clang
# # - name: apt dependencies
# # run: sudo apt update && sudo apt install -y --no-install-recommends libtbb-dev
# # if: startsWith(matrix.os, 'ubuntu')

# template: add -DCMAKE_CXX_STANDARD=${{ matrix.cxx-std }} to cmake command if multiple std version testing is wanted
- name: Configure
run: |
mkdir build
cd build
${{ matrix.cxx-override }} \
cmake -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DCPPTEMPLATE_BUILD_TESTS=${{ matrix.mode == 'Debug' }} ..
# # template: add -DCMAKE_CXX_STANDARD=${{ matrix.cxx-std }} to cmake command if multiple std version testing is wanted
# - name: Configure
# run: |
# mkdir build
# cd build
# ${{ matrix.cxx-override }} \
# cmake -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DCPPTEMPLATE_BUILD_TESTS=${{ matrix.mode == 'Debug' }} ..

- name: Build
working-directory: build
run: cmake --build . --config ${{ matrix.mode }}
# - name: Build
# working-directory: build
# run: cmake --build . --config ${{ matrix.mode }}

- name: Run tests
if: ${{ matrix.mode == 'Debug' }}
working-directory: build/tests
run: ctest
# - name: Run tests
# if: ${{ matrix.mode == 'Debug' }}
# working-directory: build/tests
# run: ctest

# template: uncomment and fill paths to upload useful binaries or other files as artifacts
# - name: Upload Artifacts
# uses: actions/upload-artifact@v2
# with:
# name: ${{ runner.os }}-${{ matrix.mode }}.zip
# path: |
# ${{ matrix.pdb-path }}
# if-no-files-found: warn
# retention-days: 30
# # template: uncomment and fill paths to upload useful binaries or other files as artifacts
# # - name: Upload Artifacts
# # uses: actions/upload-artifact@v2
# # with:
# # name: ${{ runner.os }}-${{ matrix.mode }}.zip
# # path: |
# # ${{ matrix.pdb-path }}
# # if-no-files-found: warn
# # retention-days: 30

0 comments on commit afe6103

Please sign in to comment.