-
Notifications
You must be signed in to change notification settings - Fork 2
130 lines (118 loc) · 3.66 KB
/
Copy pathpackages.yml
File metadata and controls
130 lines (118 loc) · 3.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Package all the things
on:
push:
branches:
- '**'
jobs:
build_varnish:
name: Building Varnish (${{ matrix.dist }}:${{ matrix.release }} for ${{ matrix.arch }})
runs-on: ubuntu-latest
strategy: &strategy
fail-fast: false
matrix:
arch:
- amd64
# - arm64
target:
- debian:trixie:deb
- almalinux:10:rpm
# - dist: debian
# release: bullseye
# pkg: deb
# - dist: debian
# release: bookworm
# pkg: deb
# - dist: ubuntu
# release: jammy
# pkg: deb
# - dist: ubuntu
# release: noble
# pkg: deb
#
# - dist: almalinux
# release: 8
# pkg: rpm
# - dist: almalinux
# release: 9
# pkg: rpm
#
# - dist: amazonlinux
# release: 2023
# pkg: rpm
steps:
- name: Checkout Code
uses: actions/checkout@v5
with:
submodules: true
- name: Download Varnish
run: |
curl -L https://varnish-cache.org/downloads/varnish-8.0.0.tgz -o varnish-8.0.0.tar.gz
- name:
run: |
( cd varnish-cache/; tar cvzf ../debian.tar.gz debian --dereference ; )
( cd varnish-cache/; tar cvzf ../redhat.tar.gz redhat --dereference ; )
mkdir -p packages
PARAM_ARCH={{ matrix.arch }}
PARAM_DIST=`${{ matrix.target | cut -d: -f 1 }}`
PARAM_RELEASE=`${{ matrix.target | cut -d: -f 2 }}`
EXT=`${{ matrix.target | cut -d: -f 3 }}`
docker run \
--rm \
--security-opt seccomp=unconfined \
-e PARAM_ARCH=$PARAM_ARCH \
-e PARAM_DIST=$PARAM_DIST \
-e PARAM_RELEASE=$PARAM_RELEASE \
-v $(pwd):/varnish-cache \
$PARAM_DIST:$PARAM_RELEASE \
/varnish-cache/make-$EXT-packages.sh
ls packages/*/*/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: varnish-${{ matrix.dist }}-${{ matrix.release }}
path: packages/*/*/*
build_vmod:
needs: build_varnish
runs-on: ubuntu-latest
name: Building varnish-modules (${{ matrix.dist }}:${{ matrix.release }} for ${{ matrix.arch }})
strategy: &strategy
fail-fast: false
matrix:
arch:
- amd64
# - arm64
target:
- debian:trixie:deb
- almalinux:10:rpm
package:
- varnish-modules
- vmod-uuid
steps:
- name: Checkout Code
uses: actions/checkout@v5
with:
submodules: true
- name: Download a specific artifact
uses: actions/download-artifact@v4
with:
name: varnish-${{ matrix.dist }}-${{ matrix.release }}
path: packages
- name: Build
run: |
PARAM_ARCH={{ matrix.arch }}
PARAM_DIST=`${{ matrix.target | cut -d: -f 1 }}`
PARAM_RELEASE=`${{ matrix.target | cut -d: -f 2 }}`
EXT=`${{ matrix.target | cut -d: -f 3 }}`
( cd $PACKAGE/; tar cvzf ../debian.tar.gz debian --dereference ; )
( cd $PACKAGE/; tar cvzf ../redhat.tar.gz redhat --dereference ; )
docker run \
--rm \
-e PARAM_ARCH=$PARAM_ARCH \
-e PARAM_DIST=$PARAM_DIST\
-e PARAM_RELEASE=$PARAM_RELEASE \
--workdir /workdir/$PACKAGE \
-v$(pwd):/workdir \
-v$(pwd)/packages:/deps \
-v$(pwd)/new_packages:/packages \
$PARAM_DIST:$PARAM_RELEASE \
/workdir/.circleci/make-$EXT-packages-vmod.sh