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

ci: need curl installed before we can do the GH cli install on debian

This commit is contained in:
Wez Furlong 2021-12-06 09:52:19 -07:00
parent faec667ff9
commit c942dbe02d
10 changed files with 127 additions and 88 deletions

View File

@ -22,6 +22,15 @@ jobs:
- name: "set APT to non-interactive" - name: "set APT to non-interactive"
shell: bash shell: bash
run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections" run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections"
- name: "Update APT"
shell: bash
run: "apt update"
- name: "Install git"
shell: bash
run: "apt-get install -y git"
- name: "Install curl"
shell: bash
run: "apt-get install -y curl"
- name: "Install GitHub keyring" - name: "Install GitHub keyring"
shell: bash shell: bash
run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg" run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg"
@ -34,12 +43,6 @@ jobs:
- name: "Install GH CLI" - name: "Install GH CLI"
shell: bash shell: bash
run: " apt install gh" run: " apt install gh"
- name: "Install git"
shell: bash
run: "apt-get install -y git"
- name: "Install curl"
shell: bash
run: "apt-get install -y curl"
- name: "Ensure /run/sshd exists" - name: "Ensure /run/sshd exists"
shell: bash shell: bash
run: "mkdir -p /run/sshd" run: "mkdir -p /run/sshd"

View File

@ -26,6 +26,21 @@ jobs:
run: | run: |
export BUILD_REASON=Schedule export BUILD_REASON=Schedule
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
- name: "Update APT"
shell: bash
run: |
export BUILD_REASON=Schedule
apt update
- name: "Install git"
shell: bash
run: |
export BUILD_REASON=Schedule
apt-get install -y git
- name: "Install curl"
shell: bash
run: |
export BUILD_REASON=Schedule
apt-get install -y curl
- name: "Install GitHub keyring" - name: "Install GitHub keyring"
shell: bash shell: bash
run: | run: |
@ -46,16 +61,6 @@ jobs:
run: | run: |
export BUILD_REASON=Schedule export BUILD_REASON=Schedule
apt install gh apt install gh
- name: "Install git"
shell: bash
run: |
export BUILD_REASON=Schedule
apt-get install -y git
- name: "Install curl"
shell: bash
run: |
export BUILD_REASON=Schedule
apt-get install -y curl
- name: "Ensure /run/sshd exists" - name: "Ensure /run/sshd exists"
shell: bash shell: bash
run: | run: |

View File

@ -13,6 +13,15 @@ jobs:
- name: "set APT to non-interactive" - name: "set APT to non-interactive"
shell: bash shell: bash
run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections" run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections"
- name: "Update APT"
shell: bash
run: "apt update"
- name: "Install git"
shell: bash
run: "apt-get install -y git"
- name: "Install curl"
shell: bash
run: "apt-get install -y curl"
- name: "Install GitHub keyring" - name: "Install GitHub keyring"
shell: bash shell: bash
run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg" run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg"
@ -25,12 +34,6 @@ jobs:
- name: "Install GH CLI" - name: "Install GH CLI"
shell: bash shell: bash
run: " apt install gh" run: " apt install gh"
- name: "Install git"
shell: bash
run: "apt-get install -y git"
- name: "Install curl"
shell: bash
run: "apt-get install -y curl"
- name: "Ensure /run/sshd exists" - name: "Ensure /run/sshd exists"
shell: bash shell: bash
run: "mkdir -p /run/sshd" run: "mkdir -p /run/sshd"

View File

@ -22,6 +22,15 @@ jobs:
- name: "set APT to non-interactive" - name: "set APT to non-interactive"
shell: bash shell: bash
run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections" run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections"
- name: "Update APT"
shell: bash
run: "apt update"
- name: "Install git"
shell: bash
run: "apt-get install -y git"
- name: "Install curl"
shell: bash
run: "apt-get install -y curl"
- name: "Install GitHub keyring" - name: "Install GitHub keyring"
shell: bash shell: bash
run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg" run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg"
@ -34,12 +43,6 @@ jobs:
- name: "Install GH CLI" - name: "Install GH CLI"
shell: bash shell: bash
run: " apt install gh" run: " apt install gh"
- name: "Install git"
shell: bash
run: "apt-get install -y git"
- name: "Install curl"
shell: bash
run: "apt-get install -y curl"
- name: "Ensure /run/sshd exists" - name: "Ensure /run/sshd exists"
shell: bash shell: bash
run: "mkdir -p /run/sshd" run: "mkdir -p /run/sshd"

View File

@ -26,6 +26,21 @@ jobs:
run: | run: |
export BUILD_REASON=Schedule export BUILD_REASON=Schedule
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
- name: "Update APT"
shell: bash
run: |
export BUILD_REASON=Schedule
apt update
- name: "Install git"
shell: bash
run: |
export BUILD_REASON=Schedule
apt-get install -y git
- name: "Install curl"
shell: bash
run: |
export BUILD_REASON=Schedule
apt-get install -y curl
- name: "Install GitHub keyring" - name: "Install GitHub keyring"
shell: bash shell: bash
run: | run: |
@ -46,16 +61,6 @@ jobs:
run: | run: |
export BUILD_REASON=Schedule export BUILD_REASON=Schedule
apt install gh apt install gh
- name: "Install git"
shell: bash
run: |
export BUILD_REASON=Schedule
apt-get install -y git
- name: "Install curl"
shell: bash
run: |
export BUILD_REASON=Schedule
apt-get install -y curl
- name: "Ensure /run/sshd exists" - name: "Ensure /run/sshd exists"
shell: bash shell: bash
run: | run: |

View File

@ -13,6 +13,15 @@ jobs:
- name: "set APT to non-interactive" - name: "set APT to non-interactive"
shell: bash shell: bash
run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections" run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections"
- name: "Update APT"
shell: bash
run: "apt update"
- name: "Install git"
shell: bash
run: "apt-get install -y git"
- name: "Install curl"
shell: bash
run: "apt-get install -y curl"
- name: "Install GitHub keyring" - name: "Install GitHub keyring"
shell: bash shell: bash
run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg" run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg"
@ -25,12 +34,6 @@ jobs:
- name: "Install GH CLI" - name: "Install GH CLI"
shell: bash shell: bash
run: " apt install gh" run: " apt install gh"
- name: "Install git"
shell: bash
run: "apt-get install -y git"
- name: "Install curl"
shell: bash
run: "apt-get install -y curl"
- name: "Ensure /run/sshd exists" - name: "Ensure /run/sshd exists"
shell: bash shell: bash
run: "mkdir -p /run/sshd" run: "mkdir -p /run/sshd"

View File

@ -22,18 +22,9 @@ jobs:
- name: "set APT to non-interactive" - name: "set APT to non-interactive"
shell: bash shell: bash
run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections" run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections"
- name: "Install GitHub keyring"
shell: bash
run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg"
- name: "Add GitHub package list"
shell: bash
run: "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\" | {sudo} tee /etc/apt/sources.list.d/github-cli.list > /dev/null"
- name: "Update APT" - name: "Update APT"
shell: bash shell: bash
run: "apt update" run: "apt update"
- name: "Install GH CLI"
shell: bash
run: " apt install gh"
- name: "Cache Git installation" - name: "Cache Git installation"
uses: actions/cache@v2.1.7 uses: actions/cache@v2.1.7
with: with:
@ -54,6 +45,18 @@ jobs:
- name: "Install curl" - name: "Install curl"
shell: bash shell: bash
run: "apt-get install -y curl" run: "apt-get install -y curl"
- name: "Install GitHub keyring"
shell: bash
run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg"
- name: "Add GitHub package list"
shell: bash
run: "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\" | {sudo} tee /etc/apt/sources.list.d/github-cli.list > /dev/null"
- name: "Update APT"
shell: bash
run: "apt update"
- name: "Install GH CLI"
shell: bash
run: " apt install gh"
- name: "Ensure /run/sshd exists" - name: "Ensure /run/sshd exists"
shell: bash shell: bash
run: "mkdir -p /run/sshd" run: "mkdir -p /run/sshd"

View File

@ -26,26 +26,11 @@ jobs:
run: | run: |
export BUILD_REASON=Schedule export BUILD_REASON=Schedule
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
- name: "Install GitHub keyring"
shell: bash
run: |
export BUILD_REASON=Schedule
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
- name: "Add GitHub package list"
shell: bash
run: |
export BUILD_REASON=Schedule
echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\" | {sudo} tee /etc/apt/sources.list.d/github-cli.list > /dev/null
- name: "Update APT" - name: "Update APT"
shell: bash shell: bash
run: | run: |
export BUILD_REASON=Schedule export BUILD_REASON=Schedule
apt update apt update
- name: "Install GH CLI"
shell: bash
run: |
export BUILD_REASON=Schedule
apt install gh
- name: "Cache Git installation" - name: "Cache Git installation"
uses: actions/cache@v2.1.7 uses: actions/cache@v2.1.7
with: with:
@ -69,6 +54,26 @@ jobs:
run: | run: |
export BUILD_REASON=Schedule export BUILD_REASON=Schedule
apt-get install -y curl apt-get install -y curl
- name: "Install GitHub keyring"
shell: bash
run: |
export BUILD_REASON=Schedule
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
- name: "Add GitHub package list"
shell: bash
run: |
export BUILD_REASON=Schedule
echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\" | {sudo} tee /etc/apt/sources.list.d/github-cli.list > /dev/null
- name: "Update APT"
shell: bash
run: |
export BUILD_REASON=Schedule
apt update
- name: "Install GH CLI"
shell: bash
run: |
export BUILD_REASON=Schedule
apt install gh
- name: "Ensure /run/sshd exists" - name: "Ensure /run/sshd exists"
shell: bash shell: bash
run: | run: |

View File

@ -13,18 +13,9 @@ jobs:
- name: "set APT to non-interactive" - name: "set APT to non-interactive"
shell: bash shell: bash
run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections" run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections"
- name: "Install GitHub keyring"
shell: bash
run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg"
- name: "Add GitHub package list"
shell: bash
run: "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\" | {sudo} tee /etc/apt/sources.list.d/github-cli.list > /dev/null"
- name: "Update APT" - name: "Update APT"
shell: bash shell: bash
run: "apt update" run: "apt update"
- name: "Install GH CLI"
shell: bash
run: " apt install gh"
- name: "Cache Git installation" - name: "Cache Git installation"
uses: actions/cache@v2.1.7 uses: actions/cache@v2.1.7
with: with:
@ -45,6 +36,18 @@ jobs:
- name: "Install curl" - name: "Install curl"
shell: bash shell: bash
run: "apt-get install -y curl" run: "apt-get install -y curl"
- name: "Install GitHub keyring"
shell: bash
run: "curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg"
- name: "Add GitHub package list"
shell: bash
run: "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\" | {sudo} tee /etc/apt/sources.list.d/github-cli.list > /dev/null"
- name: "Update APT"
shell: bash
run: "apt update"
- name: "Install GH CLI"
shell: bash
run: " apt install gh"
- name: "Ensure /run/sshd exists" - name: "Ensure /run/sshd exists"
shell: bash shell: bash
run: "mkdir -p /run/sshd" run: "mkdir -p /run/sshd"

View File

@ -484,28 +484,18 @@ cargo build --all --release""",
def prep_environment(self, cache=True): def prep_environment(self, cache=True):
steps = [] steps = []
sudo = "sudo -n " if self.needs_sudo() else ""
if self.uses_apt(): if self.uses_apt():
sudo = "sudo -n " if self.needs_sudo() else ""
if self.container: if self.container:
steps += [ steps += [
RunStep( RunStep(
"set APT to non-interactive", "set APT to non-interactive",
"echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections", "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections",
), ),
RunStep(
"Install GitHub keyring",
f"curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | {sudo} dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg",
),
RunStep(
"Add GitHub package list",
'echo \\"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\\" | {sudo} tee /etc/apt/sources.list.d/github-cli.list > /dev/null',
),
] ]
steps += [ steps += [
RunStep("Update APT", f"{sudo}apt update"), RunStep("Update APT", f"{sudo}apt update"),
] ]
if self.container:
steps += [RunStep("Install GH CLI", f"{sudo} apt install gh")]
if self.container: if self.container:
if ("fedora" in self.container) or ("centos" in self.container): if ("fedora" in self.container) or ("centos" in self.container):
@ -530,6 +520,22 @@ cargo build --all --release""",
steps += self.install_newer_compiler() steps += self.install_newer_compiler()
steps += self.install_git() steps += self.install_git()
steps += self.install_curl() steps += self.install_curl()
if self.uses_apt():
if self.container:
steps += [
RunStep(
"Install GitHub keyring",
f"curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | {sudo} dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg",
),
RunStep(
"Add GitHub package list",
'echo \\"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\\" | {sudo} tee /etc/apt/sources.list.d/github-cli.list > /dev/null',
),
RunStep("Update APT", f"{sudo}apt update"),
RunStep("Install GH CLI", f"{sudo} apt install gh"),
]
steps += self.install_openssh_server() steps += self.install_openssh_server()
steps += [ steps += [
CheckoutStep(), CheckoutStep(),