Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/CI.yml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe pull_request should also include release branches?

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Linux
on:
push:
branches:
- '**'
- master
- 'release-*'
paths:
- '**'
tags:
Expand All @@ -15,6 +16,10 @@ on:
- '**'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: write

Expand Down Expand Up @@ -285,7 +290,6 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: '3.x'
cache: pip
- name: "Install validator deps"
run: |
python -m pip install --upgrade pip
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/CI_Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
- '**'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
test:
runs-on: ${{ matrix.os }}
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/CI_apptainer.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
name: Apptainer

on:
push:
branches:
- 'master'
paths:
- '**'
tags:
- 'v*.*.*'
pull_request:
branches:
- 'master'
paths:
- '**'
schedule:
- cron: "0 10 8 * *"
Comment on lines +4 to +5

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should definitely still run on pull_request if the dependencies change or if apptainer file changes

workflow_dispatch:

jobs:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/CI_conda_forge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ name: conda-forge

on:
schedule:
# Run at the 0th minute of the 10th hour (UTC).
# This means the job will run at 5am EST.
- cron: "0 10 * * *"
# This will automatically run on master branch only.
- cron: "0 10 * * 1"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment to apptainer

workflow_dispatch:

jobs:
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/CI_docker.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
name: Docker

on:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment to apptainer

push:
branches:
- 'master'
paths:
- '**'
tags:
- 'v*.*.*'
pull_request:
branches:
- 'master'
paths:
- '**'
schedule:
- cron: "0 10 1 * *"
workflow_dispatch:

jobs:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/CI_docker_large_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@ name: Docker_Large_Nightly

on:
schedule:
# Run at the 0th minute of the 10th hour (UTC).
# This means the job will run at 5am EST.
- cron: "0 10 * * *"
# This will automatically run on master branch only.
- cron: "0 10 15 * *"
workflow_dispatch:
inputs:
include-arm64:
description: "Also run a slow linux/arm64 QEMU smoke test"
required: false
default: false
type: boolean

jobs:
test:
runs-on: ${{ matrix.os }}
if: ${{ matrix.arch != 'linux/arm64' || (github.event_name == 'workflow_dispatch' && inputs.include-arm64) }}
continue-on-error: ${{ matrix.arch == 'linux/arm64' }}
defaults:
run:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/CI_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
- '**'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
test:
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/docker_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Deploy Docker

on:
schedule:
- cron: "0 10 * * *"
push:
branches:
- "master"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
- 'README.md'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: write
pull-requests: read
Expand Down
26 changes: 20 additions & 6 deletions .github/workflows/update_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ on:
schedule:
- cron: '00 00 * * *'
workflow_dispatch:
inputs:
force:
description: "Force update even if an open PR already exists"
required: false
default: false
type: boolean

permissions:
contents: write
Expand All @@ -17,7 +23,6 @@ jobs:
- uses: actions/setup-python@v6
with:
python-version: '3'
cache: pip

- name: "Install dependencies"
run: python -m pip install --upgrade pip
Expand All @@ -30,12 +35,25 @@ jobs:
cd SymbolicRegression.jl
echo "version=$(git describe --tags --match='v*' --abbrev=0 | sed 's/^v//')" >> $GITHUB_OUTPUT

- name: "Check for existing open PR"
id: existing-pr
env:
GH_TOKEN: ${{ github.token }}
run: |
if gh pr list --repo "$GITHUB_REPOSITORY" --head "backend-update/v${{ steps.get-latest.outputs.version }}" --state open | grep -q .; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi

- name: "Update SymbolicRegression.jl version in PySR"
if: ${{ steps.existing-pr.outputs.exists != 'true' || (github.event_name == 'workflow_dispatch' && inputs.force) }}
run: |
python .github/workflows/update_backend_version.py ${{ steps.get-latest.outputs.version }}

- name: "Create PR if necessary"
id: cpr
if: ${{ steps.existing-pr.outputs.exists != 'true' || (github.event_name == 'workflow_dispatch' && inputs.force) }}
uses: peter-evans/create-pull-request@v8
with:
branch: backend-update/v${{ steps.get-latest.outputs.version }}
Expand All @@ -50,15 +68,11 @@ jobs:
pysr/juliapkg.json

- name: "Trigger CI workflows (backend update PR)"
if: steps.cpr.outputs.pull-request-number != ''
if: ${{ steps.cpr.outputs.pull-request-number != '' || (github.event_name == 'workflow_dispatch' && inputs.force) }}
env:
GH_TOKEN: ${{ github.token }}
run: |
ref="backend-update/v${{ steps.get-latest.outputs.version }}"
gh workflow run "Linux" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true
gh workflow run "Windows" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true
gh workflow run "macOS" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true
gh workflow run "Docker" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true
gh workflow run "Apptainer" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true
gh workflow run "Documentation" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true
gh workflow run "CodeQL" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true
Loading