Skip to content

Commit

Permalink
CI: Avoid duplicated CI jobs
Browse files Browse the repository at this point in the history
Specifying the push/pull_request branch
avoids duplicated CI Jobs.
  • Loading branch information
dantti committed Jan 17, 2024
1 parent bb66ec5 commit 290a21e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@

name: CI

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

jobs:
build:
Expand All @@ -13,25 +19,20 @@ jobs:
fail-fast: true
matrix:
os:
- ubuntu-22.04
#- ubuntu-20.04
- windows-2022
#- windows-2019
- macos-12
#- macos-11
- ubuntu-latest
- windows-latest
- macos-latest

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Create build directory
run: mkdir build

- name: Install ninja-build tool
uses: turtlesec-no/get-ninja@main

- name: Make sure MSVC is found when Ninja generator is in use
uses: ilammy/msvc-dev-cmd@v1
if: ${{ runner.os == 'Windows' }}

- name: Configure project
run: cmake --preset=ci
Expand Down

0 comments on commit 290a21e

Please sign in to comment.