Skip to content

Commit 849fce5

Browse files
authored
Move ARM CI to a new CI (#3950)
* move the ARM CI out of the linux CI into a dedicated CI file * fix file name typo * rename the CI name * add this branch name temporarily to make the CI run * temporarily add pull requests to the ARM CI * revert the temporary modification to ARM CI
1 parent c2acf30 commit 849fce5

File tree

2 files changed

+133
-39
lines changed

2 files changed

+133
-39
lines changed
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: Packaging(Linux - ARM)
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- fix*
8+
- move-arm-ci-to-new-ci
9+
paths-ignore:
10+
- 'README.md'
11+
- 'LICENSE'
12+
- 'docs/**'
13+
14+
workflow_dispatch:
15+
16+
env:
17+
PRODUCT: flameshot
18+
RELEASE: 1
19+
# dockerfiles, see https://github.com/flameshot-org/flameshot-dockerfiles
20+
# docker images, see https://quay.io/repository/flameshot-org/ci-building
21+
DOCKER_REPO: quay.io/flameshot-org/ci-building
22+
# building tool: https://github.com/flameshot-org/packpack
23+
PACKPACK_REPO: flameshot-org/packpack
24+
25+
jobs:
26+
deb-pack:
27+
name: Build deb on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
28+
runs-on: ubuntu-latest
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
dist:
33+
- {
34+
name: debian-11,
35+
os: debian,
36+
symbol: bullseye,
37+
arch: armhf
38+
}
39+
- {
40+
name: debian-12,
41+
os: debian,
42+
symbol: bookworm,
43+
arch: arm64
44+
}
45+
- {
46+
name: debian-12,
47+
os: debian,
48+
symbol: bookworm,
49+
arch: armhf
50+
}
51+
- {
52+
name: ubuntu-22.04,
53+
os: ubuntu,
54+
symbol: jammy,
55+
arch: amd64
56+
}
57+
steps:
58+
- name: Set up Docker Buildx
59+
uses: docker/setup-buildx-action@v3
60+
- name: Set up QEMU
61+
uses: docker/setup-qemu-action@v3
62+
- name: Checkout Source code
63+
if: github.event_name == 'push'
64+
uses: actions/checkout@v4
65+
with:
66+
fetch-depth: 0
67+
ref: master
68+
- name: Checkout Source code
69+
if: github.event_name == 'pull_request'
70+
uses: actions/checkout@v4
71+
with:
72+
fetch-depth: 0
73+
ref: ${{ github.event.pull_request.head.sha }}
74+
- name: Set env & Print flameshot version
75+
shell: bash
76+
run: |
77+
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
78+
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
79+
git_hash=$(git rev-parse --short HEAD)
80+
ver_info=${last_committed_tag}+git${git_revno}.${git_hash}
81+
echo "=======FLAMESHOT VERSION========"
82+
echo ${last_committed_tag:1}
83+
echo "Details: ${ver_info}"
84+
echo "================================"
85+
echo "VERSION=${last_committed_tag:1}" >> $GITHUB_ENV
86+
echo "VER_INFO=${ver_info}" >> $GITHUB_ENV
87+
- name: Get packpack tool
88+
uses: actions/checkout@v4
89+
with:
90+
repository: ${{ env.PACKPACK_REPO }}
91+
path: tools
92+
ref: multiarch
93+
set-safe-directory: $GITHUB_WORKSPACE/tools
94+
- name: Packaging on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
95+
env:
96+
OS: ${{ matrix.dist.os }}
97+
DIST: ${{ matrix.dist.symbol }}
98+
DOCKER_ARCH: ${{ matrix.dist.arch }}
99+
run: |
100+
case ${DOCKER_ARCH} in
101+
arm32v7)
102+
export ARCH=arm/v7
103+
;;
104+
armhf)
105+
export ARCH=arm/v7
106+
;;
107+
arm64*)
108+
export ARCH=arm64
109+
;;
110+
*)
111+
export ARCH=${DOCKER_ARCH}
112+
;;
113+
esac
114+
cp -r $GITHUB_WORKSPACE/packaging/debian $GITHUB_WORKSPACE
115+
bash $GITHUB_WORKSPACE/tools/packpack
116+
mv $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}_${{ matrix.dist.arch }}.deb $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb
117+
- name: SHA256Sum of ${{ matrix.dist.name }} ${{ matrix.dist.arch }} package
118+
run: |
119+
cd "$GITHUB_WORKSPACE/build/" || { >&2 echo "Cannot cd to '$GITHUB_WORKSPACE/build/'!"; exit 11 ; }
120+
sha256sum ${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb | tee ${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb.sha256sum
121+
- name: Artifact Upload
122+
uses: actions/upload-artifact@v4
123+
with:
124+
name: ${{ env.PRODUCT }}-${{ env.VER_INFO }}-artifact-${{ matrix.dist.name }}-${{ matrix.dist.arch }}
125+
path: |
126+
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb
127+
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb.sha256sum
128+
overwrite: true
129+
130+

.github/workflows/Linux-pack.yml

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -41,36 +41,12 @@ jobs:
4141
symbol: bullseye,
4242
arch: amd64
4343
}
44-
- {
45-
name: debian-11,
46-
os: debian,
47-
symbol: bullseye,
48-
arch: arm64
49-
}
50-
- {
51-
name: debian-11,
52-
os: debian,
53-
symbol: bullseye,
54-
arch: armhf
55-
}
5644
- {
5745
name: debian-12,
5846
os: debian,
5947
symbol: bookworm,
6048
arch: amd64
6149
}
62-
- {
63-
name: debian-12,
64-
os: debian,
65-
symbol: bookworm,
66-
arch: arm64
67-
}
68-
- {
69-
name: debian-12,
70-
os: debian,
71-
symbol: bookworm,
72-
arch: armhf
73-
}
7450
- {
7551
name: ubuntu-22.04,
7652
os: ubuntu,
@@ -125,22 +101,10 @@ jobs:
125101
env:
126102
OS: ${{ matrix.dist.os }}
127103
DIST: ${{ matrix.dist.symbol }}
128-
DOCKER_ARCH: ${{ matrix.dist.arch }}
104+
#DOCKER_ARCH: ${{ matrix.dist.arch }}
105+
## I cannot see if ARCH is used anywhere. Should we remove it?
106+
#ARCH: ${{ matrix.dist.arch }}
129107
run: |
130-
case ${DOCKER_ARCH} in
131-
arm32v7)
132-
export ARCH=arm/v7
133-
;;
134-
armhf)
135-
export ARCH=arm/v7
136-
;;
137-
arm64*)
138-
export ARCH=arm64
139-
;;
140-
*)
141-
export ARCH=${DOCKER_ARCH}
142-
;;
143-
esac
144108
cp -r $GITHUB_WORKSPACE/packaging/debian $GITHUB_WORKSPACE
145109
bash $GITHUB_WORKSPACE/tools/packpack
146110
mv $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}_${{ matrix.dist.arch }}.deb $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb

0 commit comments

Comments
 (0)