-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Update CI to use Pixi #971
Changes from all commits
01e6195
7b4271b
b7b2fe1
30d8759
e5a37d0
9b86c11
59ef7f4
c4142f6
9f1acf8
da85896
cb16601
6dfb850
53780af
20fbeeb
9fbde59
7d35e0f
50c741f
00e1c03
2916ab5
14b936f
c61d27b
942af55
006e7da
49647c6
45c7f29
515eb87
b5b46f7
edc0810
2d7b1b3
b6303e7
e619273
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,50 +2,71 @@ name: docs | |
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+' | ||
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+' | ||
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+' | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+a[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+b[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+" | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
description: 'Site to build and deploy' | ||
description: "Site to build and deploy" | ||
type: choice | ||
options: | ||
- dev | ||
- main | ||
- dryrun | ||
- dev | ||
- main | ||
- dryrun | ||
required: true | ||
default: dryrun | ||
schedule: | ||
- cron: '0 13 * * SUN' | ||
- cron: "0 13 * * SUN" | ||
|
||
defaults: | ||
run: | ||
shell: bash -e {0} | ||
|
||
env: | ||
DISPLAY: ":99.0" | ||
|
||
jobs: | ||
build_docs: | ||
name: Documentation | ||
runs-on: 'ubuntu-latest' | ||
pixi_lock: | ||
name: Pixi lock | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: holoviz-dev/holoviz_tasks/pixi_lock@v0 | ||
|
||
docs_build: | ||
name: Build Documentation | ||
needs: [pixi_lock] | ||
runs-on: "ubuntu-latest" | ||
timeout-minutes: 120 | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Fetch unshallow | ||
run: git fetch --prune --tags --unshallow -f | ||
- uses: actions/setup-python@v5 | ||
- uses: holoviz-dev/holoviz_tasks/pixi_install@v0 | ||
with: | ||
environments: docs | ||
- name: Build documentation | ||
run: pixi run -e docs docs-build | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
python-version: '3.9' | ||
name: docs | ||
if-no-files-found: error | ||
path: builtdocs | ||
- name: Set output | ||
id: vars | ||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | ||
- name: graphviz | ||
run: sudo apt install graphviz graphviz-dev | ||
- name: env setup | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install hatch | ||
- name: build docs | ||
run: hatch -v run docs:build | ||
|
||
docs_publish: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this workflow divided in two jobs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the upload fails because of a connection issue, you don't need to build the docs again. However, it is not a big problem in param. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah ok, I've never seen that fail before during a docs build. Do you mind simplifying this workflow into one single job? Let's keep things simple! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I agree, though I think the simplest thing is to align the CI files across projects. |
||
name: Publish Documentation | ||
runs-on: "ubuntu-latest" | ||
needs: [docs_build] | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: docs | ||
path: builtdocs/ | ||
- name: Set output | ||
id: vars | ||
run: echo "tag=${{ needs.docs_build.outputs.tag }}" >> $GITHUB_OUTPUT | ||
- name: Deploy dev | ||
uses: peaceiris/actions-gh-pages@v4 | ||
if: | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: nightly_lock | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
env: | ||
PACKAGE: "param" | ||
|
||
jobs: | ||
pixi_lock: | ||
name: Pixi lock | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: holoviz-dev/holoviz_tasks/pixi_lock@v0 | ||
- name: Upload lock-file to S3 | ||
if: '!github.event.pull_request.head.repo.fork' | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_DEFAULT_REGION: "eu-west-1" | ||
run: | | ||
zip $(date +%Y-%m-%d).zip pixi.lock pixi.toml | ||
aws s3 cp ./$(date +%Y-%m-%d).zip s3://assets.holoviz.org/lock/$PACKAGE/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean I'll have to click somewhere to release Param? I don't think I've done it yet for other places where you added that. If so, am I supposed to check something specific before I click?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It is done on the other repos, though I have limited it to lead maintainers (and me).
I use it to double-check that the version tag is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Where is the least of lead maintainers defined?
Too bad we no longer trust the system to produce the right version tag, but that's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "system" is writing tags ourselves and git push (ref). PyPi also strongly encourages it (ref).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry I don't understand, this page links to using a trusted publisher. Are we doing that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we are in places (though maybe not everywhere yet).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be sure:
publish
, which people must be approved before release. This was what I tried to reference in the PyPI ref.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok thanks I got it.
It sounds like it's more for manually checking the two builds, since otherwise it could be automated.
Ok I understand better how you use the environment to add this protection rule. Seems not so related to the trusted publisher thing for which
environment
is optional butpermissions
withid-token: write
is not.By the way I think you should add Jean-Luc and we probably need to update the list of maintainers.
All of that sounds like it would be worth being documented somewhere, it's kind of hard to follow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is automatically done. If the environment were not there, it would do everything without interaction.
Yes. I will update the holoviz site (soon).