1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-24 13:52:55 +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: with:
name: "centos8" name: "centos8"
path: "wezterm-*.rpm" 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" - name: "Upload to Nightly Release"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash shell: bash
run: | run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm"
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm

View File

@ -144,10 +144,17 @@ jobs:
path: | path: |
wezterm-*.deb wezterm-*.deb
wezterm-*.xz 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" - name: "Upload to Nightly Release"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash shell: bash
run: | run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz"
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz

View File

@ -144,10 +144,17 @@ jobs:
path: | path: |
wezterm-*.deb wezterm-*.deb
wezterm-*.xz 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" - name: "Upload to Nightly Release"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash shell: bash
run: | run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz"
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz

View File

@ -157,10 +157,17 @@ jobs:
path: | path: |
wezterm-*.deb wezterm-*.deb
wezterm-*.xz 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" - name: "Upload to Nightly Release"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash shell: bash
run: | run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz"
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz

View File

@ -117,10 +117,17 @@ jobs:
with: with:
name: "fedora33" name: "fedora33"
path: "wezterm-*.rpm" 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" - name: "Upload to Nightly Release"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash shell: bash
run: | run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm"
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm

View File

@ -117,10 +117,17 @@ jobs:
with: with:
name: "fedora34" name: "fedora34"
path: "wezterm-*.rpm" 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" - name: "Upload to Nightly Release"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash shell: bash
run: | run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm"
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm

View File

@ -117,10 +117,17 @@ jobs:
with: with:
name: "fedora35" name: "fedora35"
path: "wezterm-*.rpm" 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" - name: "Upload to Nightly Release"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash shell: bash
run: | run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm"
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm

View File

@ -101,12 +101,17 @@ jobs:
with: with:
name: "macos" name: "macos"
path: "WezTerm-*.zip" 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" - name: "Upload to Nightly Release"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash shell: bash
run: | run: "bash ci/retry.sh gh release upload --clobber nightly WezTerm-*.zip"
export BUILD_REASON=Schedule
export MACOSX_DEPLOYMENT_TARGET=10.9
bash ci/retry.sh gh release upload --clobber nightly WezTerm-*.zip

View File

@ -102,10 +102,17 @@ jobs:
*src.tar.gz *src.tar.gz
*.AppImage *.AppImage
*.zsync *.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" - name: "Upload to Nightly Release"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash shell: bash
run: | run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz *src.tar.gz *.AppImage *.zsync"
export BUILD_REASON=Schedule
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: | path: |
wezterm-*.deb wezterm-*.deb
wezterm-*.xz 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" - name: "Upload to Nightly Release"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash shell: bash
run: | run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz"
export BUILD_REASON=Schedule
bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz

View File

@ -76,10 +76,17 @@ jobs:
path: | path: |
WezTerm-*.zip WezTerm-*.zip
WezTerm-*.exe 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" - name: "Upload to Nightly Release"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash shell: bash
run: | run: "bash ci/retry.sh gh release upload --clobber nightly WezTerm-*.zip WezTerm-*.exe"
export BUILD_REASON=Schedule
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") patterns.append("*.zsync")
return patterns return patterns
def upload_asset_nightly(self): def upload_artifact_nightly(self):
steps = [] steps = []
if self.uses_yum(): if self.uses_yum():
@ -404,7 +404,21 @@ cargo build --all --release""",
ActionStep( ActionStep(
"Upload artifact", "Upload artifact",
action="actions/upload-artifact@v2", 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( RunStep(
"Upload to Nightly Release", "Upload to Nightly Release",
@ -589,11 +603,14 @@ cargo build --all --release""",
steps += self.test_all_release() steps += self.test_all_release()
steps += self.package() steps += self.package()
steps += self.upload_artifact() steps += self.upload_artifact()
return Job( return (
Job(
runs_on=self.os, runs_on=self.os,
container=self.container, container=self.container,
steps=steps, steps=steps,
env=self.global_env(), env=self.global_env(),
),
None,
) )
def continuous(self): def continuous(self):
@ -601,16 +618,21 @@ cargo build --all --release""",
steps += self.build_all_release() steps += self.build_all_release()
steps += self.test_all_release() steps += self.test_all_release()
steps += self.package(trusted=True) steps += self.package(trusted=True)
steps += self.upload_asset_nightly() steps += self.upload_artifact_nightly()
env = self.global_env() env = self.global_env()
env["BUILD_REASON"] = "Schedule" env["BUILD_REASON"] = "Schedule"
return Job( uploader = Job(runs_on="ubuntu-latest", steps=self.upload_asset_nightly())
return (
Job(
runs_on=self.os, runs_on=self.os,
container=self.container, container=self.container,
steps=steps, steps=steps,
env=env, env=env,
),
uploader,
) )
def tag(self): def tag(self):
@ -622,11 +644,14 @@ cargo build --all --release""",
steps += self.update_homebrew_tap() steps += self.update_homebrew_tap()
env = self.global_env() env = self.global_env()
return Job( return (
Job(
runs_on=self.os, runs_on=self.os,
container=self.container, container=self.container,
steps=steps, steps=steps,
env=env, env=env,
),
None,
) )
@ -654,7 +679,7 @@ def generate_actions(namer, jobber, trigger, is_continuous):
# continue # continue
name = namer(t).replace(":", "") name = namer(t).replace(":", "")
print(name) print(name)
job = jobber(t) job, uploader = jobber(t)
file_name = f".github/workflows/gen_{name}.yml" file_name = f".github/workflows/gen_{name}.yml"
if job.container: if job.container:
@ -676,6 +701,16 @@ jobs:
job.render(f, 3) 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 # Sanity check the yaml, if pyyaml is available
try: try:
import yaml import yaml