1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 13:21:38 +03:00

ci: try uploading to tag outside of docker container

This commit is contained in:
Wez Furlong 2021-12-08 10:14:08 -07:00
parent 8d3b9e55c9
commit f89f9b5b31
12 changed files with 164 additions and 54 deletions

View File

@ -122,10 +122,17 @@ jobs:
with:
name: "centos8"
path: "wezterm-*.rpm"
retention-days: 5
upload:
runs-on: ubuntu-latest
steps:
- name: "Download artifact"
uses: actions/download-artifact@v2
with:
name: "centos8"
- name: "Upload to Nightly Release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm
run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm"

View File

@ -144,10 +144,17 @@ jobs:
path: |
wezterm-*.deb
wezterm-*.xz
retention-days: 5
upload:
runs-on: ubuntu-latest
steps:
- name: "Download artifact"
uses: actions/download-artifact@v2
with:
name: "debian10.3"
- name: "Upload to Nightly Release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz
run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz"

View File

@ -144,10 +144,17 @@ jobs:
path: |
wezterm-*.deb
wezterm-*.xz
retention-days: 5
upload:
runs-on: ubuntu-latest
steps:
- name: "Download artifact"
uses: actions/download-artifact@v2
with:
name: "debian11"
- name: "Upload to Nightly Release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz
run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz"

View File

@ -157,10 +157,17 @@ jobs:
path: |
wezterm-*.deb
wezterm-*.xz
retention-days: 5
upload:
runs-on: ubuntu-latest
steps:
- name: "Download artifact"
uses: actions/download-artifact@v2
with:
name: "debian9.12"
- name: "Upload to Nightly Release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz
run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz"

View File

@ -117,10 +117,17 @@ jobs:
with:
name: "fedora33"
path: "wezterm-*.rpm"
retention-days: 5
upload:
runs-on: ubuntu-latest
steps:
- name: "Download artifact"
uses: actions/download-artifact@v2
with:
name: "fedora33"
- name: "Upload to Nightly Release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm
run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm"

View File

@ -117,10 +117,17 @@ jobs:
with:
name: "fedora34"
path: "wezterm-*.rpm"
retention-days: 5
upload:
runs-on: ubuntu-latest
steps:
- name: "Download artifact"
uses: actions/download-artifact@v2
with:
name: "fedora34"
- name: "Upload to Nightly Release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm
run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm"

View File

@ -117,10 +117,17 @@ jobs:
with:
name: "fedora35"
path: "wezterm-*.rpm"
retention-days: 5
upload:
runs-on: ubuntu-latest
steps:
- name: "Download artifact"
uses: actions/download-artifact@v2
with:
name: "fedora35"
- name: "Upload to Nightly Release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm
run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm"

View File

@ -101,12 +101,17 @@ jobs:
with:
name: "macos"
path: "WezTerm-*.zip"
retention-days: 5
upload:
runs-on: ubuntu-latest
steps:
- name: "Download artifact"
uses: actions/download-artifact@v2
with:
name: "macos"
- name: "Upload to Nightly Release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
export BUILD_REASON=Schedule
export MACOSX_DEPLOYMENT_TARGET=10.9
bash ci/retry.sh gh release upload --clobber nightly WezTerm-*.zip
run: "bash ci/retry.sh gh release upload --clobber nightly WezTerm-*.zip"

View File

@ -102,10 +102,17 @@ jobs:
*src.tar.gz
*.AppImage
*.zsync
retention-days: 5
upload:
runs-on: ubuntu-latest
steps:
- name: "Download artifact"
uses: actions/download-artifact@v2
with:
name: "ubuntu18"
- name: "Upload to Nightly Release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz *src.tar.gz *.AppImage *.zsync
run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz *src.tar.gz *.AppImage *.zsync"

View File

@ -144,10 +144,17 @@ jobs:
path: |
wezterm-*.deb
wezterm-*.xz
retention-days: 5
upload:
runs-on: ubuntu-latest
steps:
- name: "Download artifact"
uses: actions/download-artifact@v2
with:
name: "ubuntu20.04"
- name: "Upload to Nightly Release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz
run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz"

View File

@ -76,10 +76,17 @@ jobs:
path: |
WezTerm-*.zip
WezTerm-*.exe
retention-days: 5
upload:
runs-on: ubuntu-latest
steps:
- name: "Download artifact"
uses: actions/download-artifact@v2
with:
name: "windows"
- name: "Upload to Nightly Release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly WezTerm-*.zip WezTerm-*.exe
run: "bash ci/retry.sh gh release upload --clobber nightly WezTerm-*.zip WezTerm-*.exe"

View File

@ -385,7 +385,7 @@ cargo build --all --release""",
patterns.append("*.zsync")
return patterns
def upload_asset_nightly(self):
def upload_artifact_nightly(self):
steps = []
if self.uses_yum():
@ -404,7 +404,21 @@ cargo build --all --release""",
ActionStep(
"Upload artifact",
action="actions/upload-artifact@v2",
params={"name": self.name, "path": paths},
params={"name": self.name, "path": paths, "retention-days": 5},
),
]
def upload_asset_nightly(self):
steps = []
patterns = self.asset_patterns()
glob = " ".join(patterns)
return steps + [
ActionStep(
"Download artifact",
action="actions/download-artifact@v2",
params={"name": self.name},
),
RunStep(
"Upload to Nightly Release",
@ -589,11 +603,14 @@ cargo build --all --release""",
steps += self.test_all_release()
steps += self.package()
steps += self.upload_artifact()
return Job(
runs_on=self.os,
container=self.container,
steps=steps,
env=self.global_env(),
return (
Job(
runs_on=self.os,
container=self.container,
steps=steps,
env=self.global_env(),
),
None,
)
def continuous(self):
@ -601,16 +618,21 @@ cargo build --all --release""",
steps += self.build_all_release()
steps += self.test_all_release()
steps += self.package(trusted=True)
steps += self.upload_asset_nightly()
steps += self.upload_artifact_nightly()
env = self.global_env()
env["BUILD_REASON"] = "Schedule"
return Job(
runs_on=self.os,
container=self.container,
steps=steps,
env=env,
uploader = Job(runs_on="ubuntu-latest", steps=self.upload_asset_nightly())
return (
Job(
runs_on=self.os,
container=self.container,
steps=steps,
env=env,
),
uploader,
)
def tag(self):
@ -622,11 +644,14 @@ cargo build --all --release""",
steps += self.update_homebrew_tap()
env = self.global_env()
return Job(
runs_on=self.os,
container=self.container,
steps=steps,
env=env,
return (
Job(
runs_on=self.os,
container=self.container,
steps=steps,
env=env,
),
None,
)
@ -654,7 +679,7 @@ def generate_actions(namer, jobber, trigger, is_continuous):
# continue
name = namer(t).replace(":", "")
print(name)
job = jobber(t)
job, uploader = jobber(t)
file_name = f".github/workflows/gen_{name}.yml"
if job.container:
@ -676,6 +701,16 @@ jobs:
job.render(f, 3)
if uploader:
f.write(
"""
upload:
runs-on: ubuntu-latest
steps:
"""
)
uploader.render(f, 3)
# Sanity check the yaml, if pyyaml is available
try:
import yaml