Skip to content

Commit d501399

Browse files
authored
Update install-* actions (#57)
* Clean up output for automation component install * Support `uv` if present for wheel install
1 parent c7e5a66 commit d501399

File tree

2 files changed

+26
-14
lines changed

2 files changed

+26
-14
lines changed

actions/install-automation-components/action.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,30 @@ runs:
1919
- shell: bash
2020
if: steps.check_os.outputs.os == 'ubuntu'
2121
run: |-
22-
# packages
22+
echo "::group::install-automation-components - install curl/git/wget/jq"
2323
sudo apt update -y
24-
sudo apt install -y curl git-all wget jq
25-
# install gcc
24+
sudo apt install -y curl git-all jq wget
25+
echo "::endgroup::"
26+
27+
echo "::group::install-automation-components - install gcc"
2628
sudo apt install -y gcc-10 g++-10 lld
2729
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 110 --slave /usr/bin/g++ g++ /usr/bin/g++-10
28-
# gh cli
29-
(type -p wget >/dev/null || (sudo apt update && sudo apt install wget -y)) \
30-
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
31-
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
32-
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
33-
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
34-
&& sudo apt update \
35-
&& sudo apt install gh -y
30+
echo "::endgroup::"
31+
32+
echo "::group::install-automation-components - install gh cli tool"
33+
sudo mkdir -p -m 755 /etc/apt/keyrings \
34+
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
35+
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
36+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
37+
&& sudo apt update \
38+
&& sudo apt install gh -y
39+
echo "::endgroup::"
3640
- shell: bash
3741
if: steps.check_os.outputs.os == 'ubi-minimal'
3842
run: |-
3943
if ! command -v gh &>/dev/null; then
44+
echo "::group::install-automation-components - install gh cli tool"
4045
curl -L https://cli.github.com/packages/rpm/gh-cli.repo | sudo tee /etc/yum.repos.d/gh-cli.repo
4146
sudo microdnf install -y gh
47+
echo "::endgroup::"
4248
fi

actions/install-whl/action.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,21 @@ runs:
2424
run: |
2525
source "$VENV/bin/activate"
2626
27+
INSTALL=(pip install)
28+
29+
if command -v uv; then
30+
INSTALL=(uv "${INSTALL[@]}")
31+
fi
32+
2733
whl=$(find . -type f -iname "$NAME*.whl")
2834
if [ -n "$EXTRA" ]; then
2935
whl="$whl$EXTRA"
3036
fi
3137
32-
echo "::group::pip install $whl"
33-
pip install "$whl"
38+
echo "::group::install-wheel - ${INSTALL[@]} $whl"
39+
"${INSTALL[@]}" "$whl"
40+
echo "::endgroup::"
3441
3542
version=$(pip freeze | grep "$NAME")
3643
echo "installed $version"
37-
echo "::endgroup::"
3844
shell: bash

0 commit comments

Comments
 (0)