Skip to content

Commit fc8bc75

Browse files
resolve merge conflict
2 parents ce06057 + e35ff47 commit fc8bc75

File tree

95 files changed

+8573
-2176
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+8573
-2176
lines changed

.github/workflows/cffconvert.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
name: cffconvert
1+
# This workflow validates the citation file in the repository
2+
3+
name: Citation file validation
24

35
on:
4-
push:
5-
paths:
6-
- CITATION.cff
6+
push:
7+
paths:
8+
- CITATION.cff
79

810
jobs:
9-
validate:
10-
name: "validate"
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Check out a copy of the repository
14-
uses: actions/checkout@v2
11+
validate:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out a copy of the repository
15+
uses: actions/checkout@v4
1516

16-
- name: Check whether the citation metadata from CITATION.cff is valid
17-
uses: citation-file-format/cffconvert-github-action@2.0.0
18-
with:
19-
args: "--validate"
17+
- name: Check whether the citation metadata from CITATION.cff is valid
18+
uses: citation-file-format/cffconvert-github-action@2.0.0
19+
with:
20+
args: "--validate"
Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
name: Create versioned documentation on release
1+
name: Build versioned documentation on release
22

33
on:
4-
release:
5-
types: [published]
4+
release:
5+
types: [published]
66

7-
workflow_dispatch:
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
89

910
jobs:
10-
build:
11-
environment: dev_environment
12-
runs-on: ubuntu-latest
13-
steps:
14-
- name: Checkout
15-
uses: actions/checkout@master
16-
with:
17-
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
18-
- name: Set env
19-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
20-
- name: Install dependencies
21-
run: |
22-
sudo apt-get update;
23-
sudo apt-get install pandoc
24-
python -m pip install --upgrade pip
25-
pip install .[doc]
26-
- name: Build and Commit
27-
uses: sphinx-notes/pages@v2
28-
with:
29-
documentation_path: doc/source
30-
target_path: ${{ env.RELEASE_VERSION }}
31-
- name: Redirect stable to new release
32-
run: |
33-
echo "Redirecting stable to newly released version " $RELEASE_VERSION
34-
rm -rf stable
35-
ln -s $RELEASE_VERSION stable
36-
git add stable
37-
git commit -m "redirect stable to new version $RELEASE_VERSION"
38-
- name: Push changes
39-
uses: ad-m/github-push-action@master
40-
with:
41-
github_token: ${{ secrets.GITHUB_TOKEN }}
42-
branch: gh-pages
11+
build:
12+
environment: dev_environment
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
19+
- name: Set env
20+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
21+
- name: Install dependencies
22+
run: |
23+
sudo apt-get update;
24+
sudo apt-get install pandoc
25+
- name: Build and Commit
26+
uses: sphinx-notes/pages@v2
27+
with:
28+
requirements_path: doc/requirements.txt
29+
documentation_path: doc/source
30+
target_path: ${{ env.RELEASE_VERSION }}
31+
- name: Redirect stable to new release
32+
run: |
33+
echo "Redirecting stable to newly released version " $RELEASE_VERSION
34+
rm -rf stable
35+
ln -s $RELEASE_VERSION stable
36+
git add stable
37+
git commit -m "redirect stable to new version $RELEASE_VERSION"
38+
- name: Push changes
39+
uses: ad-m/github-push-action@master
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
branch: gh-pages

.github/workflows/docs.yml

Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,34 @@
1-
# This is a basic workflow to help you get started with Actions
21
name: Build documentation
32

4-
# Controls when the workflow will run
53
on:
6-
# Triggers the workflow on push or pull request events but only for the master branch
7-
push:
8-
branches: [ master ]
4+
push:
5+
branches: [master]
96

10-
# Allows you to run this workflow manually from the Actions tab
11-
workflow_dispatch:
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
129

13-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1410
jobs:
15-
# This workflow contains a single job called "build"
16-
build:
17-
18-
# The type of runner that the job will run on
19-
runs-on: ubuntu-latest
20-
steps:
21-
- name: Checkout
22-
uses: actions/checkout@master
23-
with:
24-
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
25-
- name: Install dependencies
26-
run: |
27-
sudo apt-get update;
28-
sudo apt-get install pandoc
29-
python -m pip install --upgrade pip
30-
pip install .[doc]
31-
- name: Build and Commit
32-
uses: sphinx-notes/pages@v2
33-
with:
34-
documentation_path: doc/source
35-
target_path: latest
36-
- name: Push changes
37-
uses: ad-m/github-push-action@master
38-
with:
39-
github_token: ${{ secrets.GITHUB_TOKEN }}
40-
branch: gh-pages
11+
# This workflow contains a single job called "build"
12+
build:
13+
# The type of runner that the job will run on
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
20+
- name: Install dependencies
21+
run: |
22+
sudo apt-get update;
23+
sudo apt-get install pandoc
24+
- name: Build and Commit
25+
uses: sphinx-notes/pages@v2
26+
with:
27+
requirements_path: doc/requirements.txt
28+
documentation_path: doc/source
29+
target_path: latest
30+
- name: Push changes
31+
uses: ad-m/github-push-action@master
32+
with:
33+
github_token: ${{ secrets.GITHUB_TOKEN }}
34+
branch: gh-pages
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# This workflow checks out a new release, builds it as a package (source and wheel) and publishes it to PyPI.
2+
3+
name: Publish Package
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Workflow will run when a release has been published for the package
8+
release:
9+
types:
10+
- published
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
jobs:
16+
build_and_publish_as_package:
17+
name: Package and upload release to PyPI
18+
runs-on: ubuntu-latest
19+
environment:
20+
name: pypi
21+
url: https://pypi.org/p/kernel_tuner
22+
permissions:
23+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Setup Python
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: "3.11"
30+
- name: Setup Poetry
31+
uses: Gr1N/setup-poetry@v8
32+
- name: Build the source distribution and pure-Python wheel
33+
run: |
34+
poetry install
35+
poetry build
36+
ls ./dist
37+
- name: Check that the number of wheels is as expected and there is one source distribution
38+
run: |
39+
SOURCES_COUNT=$(ls -lR ./dist/*.tar.gz | wc -l)
40+
echo "Number of source distributions: $SOURCES_COUNT"
41+
if [ "$SOURCES_COUNT" -ne 1 ]; then
42+
echo "::error::Number of source distributions $SOURCES_COUNT not equal to 1"
43+
exit 1;
44+
fi
45+
46+
EXPECTED_WHEELS_COUNT=1
47+
WHEELS_COUNT=$(ls -lR ./dist/*.whl | wc -l)
48+
echo "Number of wheel distributions: $WHEELS_COUNT"
49+
if [ "$WHEELS_COUNT" -ne "$EXPECTED_WHEELS_COUNT" ]; then
50+
echo "::error::Number of wheel distributions $WHEELS_COUNT not equal to $EXPECTED_WHEELS_COUNT"
51+
exit 1;
52+
fi
53+
- name: Publish package distributions to PyPI
54+
uses: pypa/gh-action-pypi-publish@release/v1
55+
with:
56+
skip-existing: true

.github/workflows/python-app.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/python-publish.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This workflow will use Nox to run tests and lint for the supported Python versions, and upload the test coverage data.
2+
3+
name: Test
4+
5+
on:
6+
push:
7+
branches:
8+
- master
9+
- release/*
10+
pull_request:
11+
branches:
12+
- master
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
jobs:
18+
build:
19+
name: Test on ${{ matrix.os }} with all supported Python versions
20+
runs-on: ${{ format('{0}-latest', matrix.os) }} # "-latest" is added here so we can use OS in the format expected by CodeCov
21+
22+
strategy:
23+
matrix:
24+
os: [ubuntu, macos]
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Setup Nox
29+
uses: fjwillemsen/setup-nox2@v3.0.0
30+
- name: Setup Poetry
31+
uses: Gr1N/setup-poetry@v8
32+
- name: Run tests with Nox
33+
run: |
34+
pip install nox-poetry
35+
nox -- skip-gpu
36+
# - name: Upload Coverage report to CodeCov
37+
# uses: codecov/codecov-action@v3
38+
# with:
39+
# token: ${{ secrets.CODECOV_TOKEN }}
40+
# files: ./coverage
41+
# os: ${{ matrix.os }}
42+
# fail_ci_if_error: false # option to Specify if CI pipeline should fail when Codecov runs into errors during upload

0 commit comments

Comments
 (0)