Skip to content

Commit 733477c

Browse files
authored
Merge pull request #3588 from f355/2.9
[ci] publish releases with artifacts
2 parents d46595c + 158585e commit 733477c

3 files changed

Lines changed: 30 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
check_suite:
1111
types: [rerequested]
1212

13+
permissions:
14+
contents: read # to fetch code (actions/checkout)
15+
1316
jobs:
1417

1518
rip-and-test:
@@ -29,6 +32,7 @@ jobs:
2932
set -x
3033
sudo apt-get install -y eatmydata
3134
eatmydata ./scripts/travis-install-build-deps.sh
35+
sudo eatmydata apt --quiet --yes upgrade
3236
cd src
3337
eatmydata ./autogen.sh
3438
eatmydata ./configure --with-realtime=uspace --disable-check-runtime-deps
@@ -54,6 +58,7 @@ jobs:
5458
sudo apt-get install -y eatmydata
5559
eatmydata ./scripts/travis-install-build-deps.sh
5660
sudo eatmydata apt-get install -y clang
61+
sudo eatmydata apt --quiet --yes upgrade
5762
cd src
5863
eatmydata ./autogen.sh
5964
CC=clang CXX=clang++ eatmydata ./configure --with-realtime=uspace --disable-check-runtime-deps
@@ -77,6 +82,7 @@ jobs:
7782
run: |
7883
./scripts/travis-install-build-deps.sh
7984
sudo apt-get install -y eatmydata
85+
sudo eatmydata apt --quiet --yes upgrade
8086
cd src
8187
eatmydata ./autogen.sh
8288
eatmydata ./configure --with-realtime=uspace --disable-check-runtime-deps --enable-build-documentation=html
@@ -108,7 +114,8 @@ jobs:
108114
set -e
109115
set -x
110116
apt-get --quiet update
111-
apt-get --yes --quiet install eatmydata
117+
apt-get --yes --quiet install eatmydata curl
118+
eatmydata apt --quiet --yes upgrade
112119
# Install stuff needed to check out the linuxcnc repo and turn it into a debian source package.
113120
eatmydata apt-get --yes --quiet install --no-install-suggests git lsb-release python3 devscripts
114121
@@ -192,7 +199,7 @@ jobs:
192199

193200

194201
package-indep:
195-
runs-on: ubuntu-latest
202+
runs-on: ubuntu-24.04
196203
strategy:
197204
matrix:
198205
image: ["debian:bullseye", "debian:bookworm", "debian:trixie", "debian:sid"]
@@ -214,7 +221,8 @@ jobs:
214221
set -e
215222
set -x
216223
apt-get --quiet update
217-
apt-get --yes --quiet install eatmydata
224+
apt-get --yes --quiet install eatmydata curl
225+
eatmydata apt --quiet --yes upgrade
218226
# Install stuff needed to check out the linuxcnc repo and turn it into a debian source package.
219227
eatmydata apt-get --yes --quiet install --no-install-suggests git lsb-release python3 devscripts
220228

scripts/get-version-from-git

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
#!/bin/bash
22

3-
if [ ! -z "$EMC2_HOME" ]; then
4-
source $EMC2_HOME/scripts/githelper.sh
3+
if [ -n "$EMC2_HOME" ]; then
4+
source "$EMC2_HOME"/scripts/githelper.sh
55
else
6-
source $(git rev-parse --show-toplevel)/scripts/githelper.sh
6+
source "$(git rev-parse --show-toplevel)"/scripts/githelper.sh
77
fi
88

9-
githelper $1
9+
githelper "$1"
1010

1111
if [ "$DEB_COMPONENT" = "scratch" ]; then
12-
1312
DESCRIBE=$(git describe --tags --exact-match 2>/dev/null)
1413
if [ -n "$DESCRIBE" ]; then
1514
echo "$DESCRIBE"

scripts/githelper.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# Sets GIT_TAG to the most recent signed tag (this will fall back to the
1313
# most recent tag of any kind if no signed tag is found).
1414
#
15+
# shellcheck shell=bash
1516

1617

1718
function githelper() {
@@ -45,46 +46,53 @@ function githelper() {
4546
;;
4647
*)
4748
GIT_TAG_GLOB="*"
49+
# Disable unused variable warnings on DEB_COMPONENT
50+
# shellcheck disable=SC2034
4851
DEB_COMPONENT="scratch"
4952
;;
5053
esac
5154

5255

5356
# use the gnupg keyring from our git repo to verify signatures on the release tags
54-
export GNUPGHOME=$(git rev-parse --show-toplevel)/gnupg
57+
GNUPGHOME=$(git rev-parse --show-toplevel)/gnupg
58+
export GNUPGHOME
5559

5660
NEWEST_SIGNED_TAG_UTIME=-1
5761
NEWEST_UNSIGNED_TAG_UTIME=-1
5862
for TAG in $(git tag -l "$GIT_TAG_GLOB"); do
59-
if ! git cat-file tag $TAG > /dev/null 2> /dev/null; then
63+
if ! git cat-file tag "$TAG" > /dev/null 2> /dev/null; then
6064
continue
6165
fi
6266

63-
TAG_UTIME=$(git cat-file tag $TAG | grep tagger | awk '{print $(NF-1)-$NF*36}')
67+
TAG_UTIME=$(git cat-file tag "$TAG" | grep tagger | awk '{print $(NF-1)-$NF*36}')
6468

6569
if git tag -v "$TAG" > /dev/null 2> /dev/null; then
6670
# it's a valid signed tag
67-
if [ $TAG_UTIME -gt $NEWEST_SIGNED_TAG_UTIME ]; then
71+
if [ "$TAG_UTIME" -gt "$NEWEST_SIGNED_TAG_UTIME" ]; then
6872
NEWEST_SIGNED_TAG=$TAG
6973
NEWEST_SIGNED_TAG_UTIME=$TAG_UTIME
7074
fi
7175
else
7276
# unsigned tag
73-
if [ $TAG_UTIME -gt $NEWEST_UNSIGNED_TAG_UTIME ]; then
77+
if [ "$TAG_UTIME" -gt "$NEWEST_UNSIGNED_TAG_UTIME" ]; then
7478
NEWEST_UNSIGNED_TAG=$TAG
7579
NEWEST_UNSIGNED_TAG_UTIME=$TAG_UTIME
7680
fi
7781
fi
7882

7983
done
8084

81-
if [ $NEWEST_SIGNED_TAG_UTIME -gt -1 ]; then
85+
if [ "$NEWEST_SIGNED_TAG_UTIME" -gt -1 ]; then
86+
# Disable unused variable warnings on GIT_TAG
87+
# shellcheck disable=SC2034
8288
GIT_TAG="$NEWEST_SIGNED_TAG"
8389
return
8490
fi
8591

86-
if [ $NEWEST_UNSIGNED_TAG_UTIME -gt -1 ]; then
92+
if [ "$NEWEST_UNSIGNED_TAG_UTIME" -gt -1 ]; then
8793
echo "no signed tags found, falling back to unsigned tags" > /dev/null 1>&2
94+
# Disable unused variable warnings on GIT_TAG
95+
# shellcheck disable=SC2034
8896
GIT_TAG="$NEWEST_UNSIGNED_TAG"
8997
return
9098
fi

0 commit comments

Comments
 (0)