-
Notifications
You must be signed in to change notification settings - Fork 50
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
80 changed files
with
6,694 additions
and
1,828 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 |
---|---|---|
@@ -1,19 +1,20 @@ | ||
name: cffconvert | ||
# This workflow validates the citation file in the repository | ||
|
||
name: Citation file validation | ||
|
||
on: | ||
push: | ||
paths: | ||
- CITATION.cff | ||
push: | ||
paths: | ||
- CITATION.cff | ||
|
||
jobs: | ||
validate: | ||
name: "validate" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out a copy of the repository | ||
uses: actions/checkout@v2 | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out a copy of the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check whether the citation metadata from CITATION.cff is valid | ||
uses: citation-file-format/[email protected] | ||
with: | ||
args: "--validate" | ||
- name: Check whether the citation metadata from CITATION.cff is valid | ||
uses: citation-file-format/[email protected] | ||
with: | ||
args: "--validate" |
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,42 +1,42 @@ | ||
name: Create versioned documentation on release | ||
name: Build versioned documentation on release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
release: | ||
types: [published] | ||
|
||
workflow_dispatch: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
environment: dev_environment | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update; | ||
sudo apt-get install pandoc | ||
python -m pip install --upgrade pip | ||
pip install .[doc] | ||
- name: Build and Commit | ||
uses: sphinx-notes/pages@v2 | ||
with: | ||
documentation_path: doc/source | ||
target_path: ${{ env.RELEASE_VERSION }} | ||
- name: Redirect stable to new release | ||
run: | | ||
echo "Redirecting stable to newly released version " $RELEASE_VERSION | ||
rm -rf stable | ||
ln -s $RELEASE_VERSION stable | ||
git add stable | ||
git commit -m "redirect stable to new version $RELEASE_VERSION" | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages | ||
build: | ||
environment: dev_environment | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update; | ||
sudo apt-get install pandoc | ||
- name: Build and Commit | ||
uses: sphinx-notes/pages@v2 | ||
with: | ||
requirements_path: doc/requirements.txt | ||
documentation_path: doc/source | ||
target_path: ${{ env.RELEASE_VERSION }} | ||
- name: Redirect stable to new release | ||
run: | | ||
echo "Redirecting stable to newly released version " $RELEASE_VERSION | ||
rm -rf stable | ||
ln -s $RELEASE_VERSION stable | ||
git add stable | ||
git commit -m "redirect stable to new version $RELEASE_VERSION" | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages |
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,40 +1,34 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
name: Build documentation | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [ master ] | ||
push: | ||
branches: [master] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
|
||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update; | ||
sudo apt-get install pandoc | ||
python -m pip install --upgrade pip | ||
pip install .[doc] | ||
- name: Build and Commit | ||
uses: sphinx-notes/pages@v2 | ||
with: | ||
documentation_path: doc/source | ||
target_path: latest | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update; | ||
sudo apt-get install pandoc | ||
- name: Build and Commit | ||
uses: sphinx-notes/pages@v2 | ||
with: | ||
requirements_path: doc/requirements.txt | ||
documentation_path: doc/source | ||
target_path: latest | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages |
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,56 @@ | ||
# This workflow checks out a new release, builds it as a package (source and wheel) and publishes it to PyPI. | ||
|
||
name: Publish Package | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Workflow will run when a release has been published for the package | ||
release: | ||
types: | ||
- published | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_publish_as_package: | ||
name: Package and upload release to PyPI | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/kernel_tuner | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Setup Poetry | ||
uses: Gr1N/setup-poetry@v8 | ||
- name: Build the source distribution and pure-Python wheel | ||
run: | | ||
poetry install | ||
poetry build | ||
ls ./dist | ||
- name: Check that the number of wheels is as expected and there is one source distribution | ||
run: | | ||
SOURCES_COUNT=$(ls -lR ./dist/*.tar.gz | wc -l) | ||
echo "Number of source distributions: $SOURCES_COUNT" | ||
if [ "$SOURCES_COUNT" -ne 1 ]; then | ||
echo "::error::Number of source distributions $SOURCES_COUNT not equal to 1" | ||
exit 1; | ||
fi | ||
EXPECTED_WHEELS_COUNT=1 | ||
WHEELS_COUNT=$(ls -lR ./dist/*.whl | wc -l) | ||
echo "Number of wheel distributions: $WHEELS_COUNT" | ||
if [ "$WHEELS_COUNT" -ne "$EXPECTED_WHEELS_COUNT" ]; then | ||
echo "::error::Number of wheel distributions $WHEELS_COUNT not equal to $EXPECTED_WHEELS_COUNT" | ||
exit 1; | ||
fi | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
skip-existing: true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,42 @@ | ||
# This workflow will use Nox to run tests and lint for the supported Python versions, and upload the test coverage data. | ||
|
||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- release/* | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Test on ${{ matrix.os }} with all supported Python versions | ||
runs-on: ${{ format('{0}-latest', matrix.os) }} # "-latest" is added here so we can use OS in the format expected by CodeCov | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu, macos] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Nox | ||
uses: fjwillemsen/[email protected] | ||
- name: Setup Poetry | ||
uses: Gr1N/setup-poetry@v8 | ||
- name: Run tests with Nox | ||
run: | | ||
pip install nox-poetry | ||
nox -- skip-gpu | ||
# - name: Upload Coverage report to CodeCov | ||
# uses: codecov/codecov-action@v3 | ||
# with: | ||
# token: ${{ secrets.CODECOV_TOKEN }} | ||
# files: ./coverage | ||
# os: ${{ matrix.os }} | ||
# fail_ci_if_error: false # option to Specify if CI pipeline should fail when Codecov runs into errors during upload |
Oops, something went wrong.