From 3a6f2f577d3602b44a69f397f544502fa50303d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Wed, 13 Mar 2024 13:55:29 +0000 Subject: [PATCH 1/2] Run differnt CI jobs only when relevant files are touched --- .github/workflows/benchmark.yml | 6 ++++++ .github/workflows/ci.yml | 10 ++++++++++ .github/workflows/documentation.yml | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index b8b3d8e..e8a574c 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -2,6 +2,12 @@ name: Run benchmarks on: pull_request: + paths: + - '.github/workflows/benchmark.yml' + - 'benchmark/**' + - 'src/**' + # Benchmarks include this file + - 'test/models/llw2d.jl' workflow_dispatch: concurrency: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07b7a6f..81121a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,19 @@ name: CI on: push: + paths: + - '.github/workflows/ci.yml' + - 'Project.toml' + - 'src/**' + - 'test/**' branches: [master] tags: ["*"] pull_request: + paths: + - '.github/workflows/ci.yml' + - 'Project.toml' + - 'src/**' + - 'test/**' concurrency: # Skip intermediate builds: always. diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index e616a48..97a6431 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -2,10 +2,18 @@ name: Documentation on: push: + paths: + - 'Project.toml' + - 'docs/**' + - 'src/**' branches: - master tags: '*' pull_request: + paths: + - 'Project.toml' + - 'docs/**' + - 'src/**' jobs: build: From b892e2119cccaaa9481c3d1bbc82e7b028dd4e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Wed, 13 Mar 2024 14:27:59 +0000 Subject: [PATCH 2/2] [CI] Add timeouts --- .github/workflows/benchmark.yml | 1 + .github/workflows/ci.yml | 1 + .github/workflows/documentation.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index a75dcf1..1fb8246 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -18,6 +18,7 @@ concurrency: jobs: benchmark: + timeout-minutes: 90 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b7ce4e..9beb4a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,7 @@ concurrency: jobs: test: + timeout-minutes: 60 name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.threads }} threads env: JULIA_NUM_THREADS: ${{ matrix.threads }} diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index a6d226c..fc22430 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -17,6 +17,7 @@ on: jobs: build: + timeout-minutes: 30 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4