Skip to content

Commit

Permalink
Merge pull request #63 from astronomy-commons/sandro/run-copier
Browse files Browse the repository at this point in the history
Run copier to patch workflows
  • Loading branch information
camposandro authored Nov 13, 2023
2 parents 03e93be + 7c44c60 commit e9b2562
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: v1.4.4
_commit: v1.4.4-6-g94ac891
_src_path: gh:lincc-frameworks/python-project-template
author_email: [email protected]
author_name: LINCC Frameworks
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/asv-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,14 @@ env:
PYTHON_VERSION: "3.10"
WORKING_DIR: ${{ github.workspace }}/benchmarks

jobs:

consecutiveness:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

steps:
- name: Set workflows on main to run consecutively
uses: mktcode/consecutive-workflow-action@eb43c6b5852dd0e33efa797a1817196d06daa4b2
with:
token: ${{ secrets.GITHUB_TOKEN }}
jobs:

setup-python:
runs-on: ubuntu-latest
needs: consecutiveness

steps:
- name: Cache Python ${{ env.PYTHON_VERSION }}
Expand Down Expand Up @@ -86,7 +80,7 @@ jobs:
fi
- name: Run ASV for the main branch
run: asv run ALL --skip-existing --verbose
run: asv run ALL --skip-existing --verbose || true

- name: Submit new results to the "benchmarks" branch
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/asv-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,23 @@ jobs:
python -m pip install --upgrade pip
pip install asv==0.6.1 virtualenv
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Create ASV machine config file
run: asv machine --machine gh-runner --yes

- name: Fetch previous results from the "benchmarks" branch
run: |
if git ls-remote --exit-code origin benchmarks > /dev/null 2>&1; then
git merge origin/benchmarks \
--allow-unrelated-histories \
--no-commit
mv ../_results .
fi
- name: Get nightly dates under comparison
id: nightly-dates
run: |
Expand All @@ -65,13 +79,11 @@ jobs:
run: |
HASH_FILE=${{ env.NIGHTLY_HASH_FILE }}
CURRENT_HASH=${{ github.sha }}
if [ -f $HASH_FILE ]; then
PREV_HASH=$(cat $HASH_FILE)
asv continuous $PREV_HASH $CURRENT_HASH --verbose || true
asv compare $PREV_HASH $CURRENT_HASH --sort ratio --verbose
fi
echo $CURRENT_HASH > $HASH_FILE
- name: Update last nightly hash in cache
Expand Down

0 comments on commit e9b2562

Please sign in to comment.