ci: Only run once if pushing to main repo branch
Some checks failed
ci / cmake-unix (3.15, macos-latest) (push) Has been cancelled
ci / cmake-unix (3.15, ubuntu-latest) (push) Has been cancelled
ci / cmake-unix (latest, macos-latest) (push) Has been cancelled
ci / cmake-unix (latest, ubuntu-latest) (push) Has been cancelled
ci / cmake-windows (3.15) (push) Has been cancelled
ci / cmake-windows (latest) (push) Has been cancelled
ci / windows_clang (clang) (push) Has been cancelled
ci / windows_clang (clang-cl) (push) Has been cancelled
ci / reuse (push) Has been cancelled

This commit is contained in:
Charles Giessen 2024-10-22 11:33:05 -05:00 committed by Charles Giessen
parent b955ae0edb
commit e271cfd480

View file

@ -7,8 +7,6 @@ name: ci
on: on:
push: push:
pull_request: pull_request:
branches:
- main
env: env:
CMAKE_GENERATOR: Ninja CMAKE_GENERATOR: Ninja
@ -19,6 +17,7 @@ permissions:
jobs: jobs:
cmake-unix: cmake-unix:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy: strategy:
matrix: matrix:
os: [ ubuntu-latest, macos-latest ] os: [ ubuntu-latest, macos-latest ]
@ -37,6 +36,7 @@ jobs:
cmake-windows: cmake-windows:
runs-on: windows-latest runs-on: windows-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy: strategy:
matrix: matrix:
cmake-version: [ '3.15', 'latest'] cmake-version: [ '3.15', 'latest']
@ -54,6 +54,7 @@ jobs:
windows_clang: windows_clang:
runs-on: windows-2022 runs-on: windows-2022
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy: strategy:
matrix: matrix:
compiler: [ clang, clang-cl ] compiler: [ clang, clang-cl ]
@ -75,6 +76,7 @@ jobs:
reuse: reuse:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: REUSE Compliance Check - name: REUSE Compliance Check