-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
234 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @quantco/ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
reviewers: | ||
- quantco/ci | ||
groups: | ||
dependencies: | ||
patterns: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Autoupdate | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 */6 * * *" | ||
|
||
defaults: | ||
run: | ||
shell: | ||
bash -el {0} | ||
|
||
jobs: | ||
check_update: | ||
name: Check if newer version exists | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: Set up Conda env | ||
uses: mamba-org/provision-with-micromamba@3c96c0c27676490c63c18bc81f5c51895ac3e0e6 | ||
with: | ||
environment-name: check-env | ||
- name: Find latest version | ||
id: versions | ||
run: | | ||
pkgname="$(yq '.dependencies[0]' environment.yml | grep -Eio '[a-z0-9_-]+' | head -n 1)" | ||
old_version=$(micromamba list -n check-env "$pkgname" --json | jq -r '.[0].version') | ||
micromamba update -y -n check-env -a | ||
new_version=$(micromamba list -n check-env "$pkgname" --json | jq -r '.[0].version') | ||
if [[ "$new_version" != "$old_version" ]]; then | ||
sed -i "s/$old_version/$new_version/g" environment.yml | ||
echo "pkgname=$pkgname" >> "$GITHUB_OUTPUT" | ||
echo "new-version=$new_version" >> "$GITHUB_OUTPUT" | ||
fi | ||
- uses: peter-evans/create-pull-request@a05bf394bea84a3b732877fcc92a5fa7a09069c3 | ||
if: steps.versions.outputs.pkgname | ||
with: | ||
commit-message: "Update ${{ steps.versions.outputs.pkgname }} to ${{ steps.versions.outputs.new-version }}" | ||
title: "Update ${{ steps.versions.outputs.pkgname }} to ${{ steps.versions.outputs.new-version }}" | ||
body: | | ||
A new release of ${{ steps.versions.outputs.pkgname }} was detected on conda-forge. | ||
This PR updates ${{ steps.versions.outputs.pkgname }} to version ${{ steps.versions.outputs.new-version }}. | ||
**After merging, please manually create and push a ${{ steps.versions.outputs.new-version }} tag:** | ||
``` | ||
bash -xc 'tmp=$(mktemp -d) && git clone ${{ github.server_url }}/${{ github.repository }} $tmp && cd $tmp && git tag ${{ steps.versions.outputs.new-version }} && git push --tags' | ||
``` | ||
branch: v${{ steps.versions.outputs.new-version }} | ||
delete-branch: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
env: | ||
name: Test env | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: Set up Conda env | ||
uses: mamba-org/provision-with-micromamba@3c96c0c27676490c63c18bc81f5c51895ac3e0e6 | ||
with: | ||
environment-name: test-env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Keep | ||
on: | ||
# pull_request: | ||
schedule: | ||
- cron: "0 6 * * SUN" # Once weekly on Sunday @ 0600 UTC | ||
|
||
jobs: | ||
keep-alive: | ||
name: Alive | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: gautamkrishnar/keepalive-workflow@790c7f09285a59b09bb578c85e271c6ff2af97c4 | ||
with: | ||
commit_message: "Ah ah ah, stayin' alive" | ||
committer_username: ForrestQuant | ||
committer_email: "[email protected]" | ||
time_elapsed: 50 # days |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- id: clang-tidy-conda | ||
name: clang-tidy-conda | ||
entry: clang-tidy | ||
language: conda | ||
'types': ['c++'] | ||
args: [] | ||
require_serial: true | ||
additional_dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
# pre-commit-mirrors-clang-tidy | ||
clang-tidy(-conda) mirror | ||
=================== | ||
|
||
Mirror of clang-tidy for pre-commit with conda as a language. | ||
|
||
* For pre-commit: see https://github.com/pre-commit/pre-commit | ||
* For clang-tidy: see https://clang.llvm.org/extra/clang-tidy/ | ||
|
||
### Using clang-tidy with pre-commit and conda: | ||
|
||
Add this to your `.pre-commit-config.yaml` | ||
|
||
```yaml | ||
- repo: https://github.com/Quantco/pre-commit-mirrors-clang-tidy | ||
rev: '' # Use the sha / tag you want to point at | ||
hooks: | ||
- id: clang-tidy-conda | ||
``` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- clangdev=16.0.6 |