mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 08:26:07 +08:00
Update/fix nightly build (untested)
This commit is contained in:
parent
2b8a960421
commit
1feadb4be7
16
.github/workflows/installers.yml
vendored
16
.github/workflows/installers.yml
vendored
@ -6,7 +6,7 @@ on:
|
||||
inputs:
|
||||
cura_conan_version:
|
||||
description: 'Cura Conan Version'
|
||||
default: 'cura/latest@ultimaker/testing'
|
||||
default: 'cura/[*]@ultimaker/testing'
|
||||
required: true
|
||||
type: string
|
||||
conan_args:
|
||||
@ -24,11 +24,6 @@ on:
|
||||
default: false
|
||||
required: true
|
||||
type: boolean
|
||||
nightly:
|
||||
description: 'Upload to nightly release'
|
||||
default: false
|
||||
required: true
|
||||
type: boolean
|
||||
|
||||
workflow_call:
|
||||
inputs:
|
||||
@ -48,15 +43,6 @@ on:
|
||||
default: false
|
||||
required: true
|
||||
type: boolean
|
||||
nightly:
|
||||
default: false
|
||||
required: true
|
||||
type: boolean
|
||||
|
||||
schedule:
|
||||
# Daily at 4:15 CET (main-branch) and 5:15 CET (release-branch)
|
||||
- cron: '15 3 * * *'
|
||||
- cron: '15 4 * * *'
|
||||
|
||||
env:
|
||||
CONAN_ARGS: ${{ inputs.conan_args || '' }}
|
||||
|
17
.github/workflows/nightly-stable.yml
vendored
Normal file
17
.github/workflows/nightly-stable.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
name: Nightly build - stable release
|
||||
run-name: Nightly build - stable release
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Daily at 5:15 CET
|
||||
- cron: '15 4 * * *'
|
||||
|
||||
jobs:
|
||||
build-nightly:
|
||||
# FIXME: Use main once merged
|
||||
uses: ultimaker/cura/.github/workflows/nightly.yml@CURA-11622_conan_v2
|
||||
with:
|
||||
# FIXME: Use stable channel once merged
|
||||
cura_conan_version: "cura/[*]@ultimaker/cura_11622"
|
||||
release_tag: "nightly"
|
||||
caller_workflow: "nightly-stable.yml"
|
17
.github/workflows/nightly-testing.yml
vendored
Normal file
17
.github/workflows/nightly-testing.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
name: Nightly build - dev release
|
||||
run-name: Nightly build - dev release
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Daily at 4:15 CET
|
||||
- cron: '15 3 * * *'
|
||||
|
||||
jobs:
|
||||
build-nightly:
|
||||
# FIXME: Use main once merged
|
||||
uses: ultimaker/cura/.github/workflows/nightly.yml@CURA-11622_conan_v2
|
||||
with:
|
||||
# FIXME: Use testing channel once merged
|
||||
cura_conan_version: "cura/[*]@ultimaker/cura_11622"
|
||||
release_tag: "nightly-5.6" # Fixed version, we reuse the same tag forever
|
||||
caller_workflow: "nightly-testing.yml"
|
99
.github/workflows/nightly.yml
vendored
Normal file
99
.github/workflows/nightly.yml
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
name: Nightly build
|
||||
run-name: Nightly build
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
cura_conan_version:
|
||||
default: ''
|
||||
required: true
|
||||
type: string
|
||||
release_tag:
|
||||
default: ''
|
||||
required: true
|
||||
type: string
|
||||
caller_workflow:
|
||||
default: ''
|
||||
required: true
|
||||
type: string
|
||||
|
||||
|
||||
jobs:
|
||||
create-installers:
|
||||
name: Create installers
|
||||
id: create-installers
|
||||
# FIXME: Use main once merged
|
||||
uses: ultimaker/cura/github/workflows/installers.yml@CURA-11622_conan_v2
|
||||
with:
|
||||
cura_conan_version: ${{ inputs.cura_conan_version }}
|
||||
secrets: inherit
|
||||
|
||||
update-nightly-release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ create-installers ]
|
||||
steps:
|
||||
- name: Download installers jobs artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: installers
|
||||
merge-multiple: true
|
||||
|
||||
- name: Rename the installers
|
||||
id: rename-installers
|
||||
shell: python
|
||||
working-directory: installers
|
||||
run: |
|
||||
import os
|
||||
|
||||
first_file = True
|
||||
|
||||
for file in os.listdir("."):
|
||||
if file.startswith("UltiMaker-Cura-"):
|
||||
# Find the commit tag, and replace it with "nightly"
|
||||
index_plus = file.index("+")
|
||||
file_start = file[:index_plus]
|
||||
file_end = file[index_plus:]
|
||||
file_end = file_end[file_end.index("-")+1:]
|
||||
|
||||
new_file_name = f"{file_start}-nightly-{file_end}"
|
||||
os.rename(file, new_file_name)
|
||||
|
||||
if first_file:
|
||||
first_file = False
|
||||
|
||||
short_version = file_start.split("-")[2]
|
||||
short_version = ".".join(short_version.split(".")[:2])
|
||||
|
||||
with open(os.environ["GITHUB_OUTPUT"], "a") as github_output:
|
||||
github_output.write(f"cura_version={file_start}\n")
|
||||
github_output.write(f"short_version={file_start}\n")
|
||||
|
||||
|
||||
- name: create the release notes
|
||||
shell: python
|
||||
run: |
|
||||
import os
|
||||
import datetime
|
||||
from jinja2 import Template
|
||||
|
||||
with open(".github/workflows/nightly_release_notes.md.jinja", "r") as f:
|
||||
release_notes = Template(f.read())
|
||||
|
||||
short_version = "${{ steps.rename-installers.outputs.short_version }}"
|
||||
caller_workflow = "${{ inputs.caller_workflow }}"
|
||||
is_main = os.getenv("GITHUB_REF") == "refs/heads/main"
|
||||
|
||||
with open("release-notes.md", "w") as f:
|
||||
f.write(release_notes.render(
|
||||
timestamp=str(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")),
|
||||
caller_workflow=caller_workflow,
|
||||
branch="" if is_main else short_version,
|
||||
branch_specific="" is_main else f"?branch={short_version}",
|
||||
))
|
||||
|
||||
- name: Update nightly release description (with date)
|
||||
if: always()
|
||||
run: |
|
||||
gh release edit ${{ inputs.release_tag }} --title "${{ steps.rename-installers.outputs.cura_version }}" --notes-file release-notes.md
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@ -4,7 +4,7 @@
|
||||
|
||||
| | |
|
||||
|--------------:|--------------------------------------------------------------------------------------------|
|
||||
| **Nightlies** | [](https://github.com/Ultimaker/Cura/actions/workflows/installers.yml) |
|
||||
|
||||
# Unit Test results
|
||||
@ -36,4 +36,4 @@
|
||||
| **libSavitar** | [](https://github.com/Ultimaker/libSavitar/actions/workflows/conan-package.yml) |
|
||||
| **pySavitar** | [](https://github.com/Ultimaker/pySavitar/actions/workflows/conan-package.yml) |
|
||||
| **libnest2d** | [](https://github.com/Ultimaker/libnest2d/actions/workflows/conan-package.yml) |
|
||||
| **pynest2d** | [](https://github.com/Ultimaker/pynest2d/actions/workflows/conan-package.yml) |
|
||||
| **pynest2d** | [](https://github.com/Ultimaker/pynest2d/actions/workflows/conan-package.yml) |
|
Loading…
x
Reference in New Issue
Block a user