4242 BASEREPO : https://boinc.berkeley.edu/dl/linux # no trailing slash
4343 AUTOCONF_WITH_VERSION : autoconf-2.73
4444 BISON_WITH_VERSION : bison-3.8.2
45+ PYTHON_VERSION : 3.9.0
4546
4647jobs :
48+ prepare-build-dependencies :
49+ name : Prepare build dependencies
50+ runs-on : ubuntu-latest
51+ container :
52+ image : debian:buster
53+ steps :
54+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
55+ with :
56+ fetch-depth : 2
57+
58+ - name : Cache dependencies
59+ uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae
60+ with :
61+ path : |
62+ ${{ env.AUTOCONF_WITH_VERSION }}.tar.gz
63+ ${{ env.BISON_WITH_VERSION }}.tar.gz
64+ Python-${{ env.PYTHON_VERSION }}.tar.xz
65+ key : ${{ env.AUTOCONF_WITH_VERSION }}_${{ env.BISON_WITH_VERSION }}_Python-${{ env.PYTHON_VERSION }}
66+
67+ - name : Fix debian sources
68+ run : |
69+ sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list
70+ sed -i 's/security.debian.org/archive.debian.org/g' /etc/apt/sources.list
71+
72+ - name : Install dependencies
73+ run : |
74+ apt-get update
75+ apt install -y autopoint make build-essential m4 pkg-config autoconf autoconf-archive libtool curl tar xz-utils make gcc libssl-dev lzma-dev liblzma-dev libreadline-dev libbz2-dev libsqlite3-dev libgdbm-dev libgdbm-compat-dev uuid-dev libffi-dev tk-dev
76+
77+ - name : Build updated version of autoconf
78+ run : |
79+ if [ ! -f ${{ env.AUTOCONF_WITH_VERSION }}.tar.gz ]; then
80+ curl https://ftp.gnu.org/gnu/autoconf/${{ env.AUTOCONF_WITH_VERSION }}.tar.gz -o ${{ env.AUTOCONF_WITH_VERSION }}.tar.gz
81+ fi
82+ tar -xzf ${{ env.AUTOCONF_WITH_VERSION }}.tar.gz
83+ cd ${{ env.AUTOCONF_WITH_VERSION }}
84+ ./configure --prefix=/usr
85+ make -j $(nproc --all)
86+ cd ..
87+
88+ - name : Build updated version of bison
89+ run : |
90+ if [ ! -f ${{ env.BISON_WITH_VERSION }}.tar.gz ]; then
91+ curl https://ftp.gnu.org/gnu/bison/${{ env.BISON_WITH_VERSION }}.tar.gz -o ${{ env.BISON_WITH_VERSION }}.tar.gz
92+ fi
93+ tar -xzf ${{ env.BISON_WITH_VERSION }}.tar.gz
94+ cd ${{ env.BISON_WITH_VERSION }}
95+ ./configure --prefix=/usr
96+ make -j $(nproc --all)
97+ cd ..
98+
99+ - name : Build updated version of python
100+ run : |
101+ if [ ! -f Python-${{ env.PYTHON_VERSION }}.tar.xz ]; then
102+ curl https://www.python.org/ftp/python/${{ env.PYTHON_VERSION }}/Python-${{ env.PYTHON_VERSION }}.tar.xz -o Python-${{ env.PYTHON_VERSION }}.tar.xz
103+ fi
104+ tar -xf Python-${{ env.PYTHON_VERSION }}.tar.xz
105+ cd Python-${{ env.PYTHON_VERSION }}
106+ ./configure --prefix=/usr/local --with-ensurepip=install
107+ make -j $(nproc --all)
108+ cd ..
109+
110+ - name : Add prepared dependencies to archive
111+ run : |
112+ tar -cvzpf build-deps_${{ github.event.pull_request.head.sha }}.tar.gz \
113+ ${{ env.AUTOCONF_WITH_VERSION }}/ \
114+ ${{ env.BISON_WITH_VERSION }}/ \
115+ Python-${{ env.PYTHON_VERSION }}/
116+
117+ - name : Upload prepared dependencies
118+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
119+ with :
120+ name : build-deps_${{ github.event.pull_request.head.sha }}
121+ path : build-deps_${{ github.event.pull_request.head.sha }}.tar.gz
122+
47123 prepare-binaries :
48124 name : Prepare Binaries
49125 runs-on : ubuntu-latest
126+ needs : prepare-build-dependencies
50127 container :
51128 image : debian:buster
52129 env :
@@ -63,14 +140,6 @@ jobs:
63140 with :
64141 fetch-depth : 2
65142
66- - name : Cache dependencies
67- uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae
68- with :
69- path : |
70- ${{ env.AUTOCONF_WITH_VERSION }}.tar.gz
71- ${{ env.BISON_WITH_VERSION }}.tar.gz
72- key : ${{ env.AUTOCONF_WITH_VERSION }}_${{ env.BISON_WITH_VERSION }}
73-
74143 - name : Check if build is running from origin repo
75144 if : ${{ success() && env.AWS_ACCESS_KEY_ID != 0 && env.AWS_SECRET_ACCESS_KEY != 0 }}
76145 run : |
89158 - name : Install dependencies
90159 run : |
91160 apt-get update
92- apt-get install -y autopoint make build-essential m4 pkg-config autoconf autoconf-archive libtool git python3 python3-distutils python3-jinja2 python3-venv curl zip unzip tar bison p7zip-full dbus flex
161+ apt-get install -y autopoint make build-essential m4 pkg-config autoconf autoconf-archive libtool git curl zip unzip tar p7zip-full dbus flex
93162
94163 - name : Install dependencies for arm64
95164 if : matrix.arch == 'arm64'
@@ -101,32 +170,43 @@ jobs:
101170 run : |
102171 apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
103172
173+ - name : Download prepared dependencies
174+ if : success()
175+ uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
176+ with :
177+ name : build-deps_${{ github.event.pull_request.head.sha }}
178+
179+ - name : Extract prepared dependencies
180+ if : success()
181+ run : |
182+ tar -xvzpf build-deps_${{ github.event.pull_request.head.sha }}.tar.gz
183+
104184 - name : Install updated version of autoconf
105185 run : |
106- if [ ! -f ${{ env.AUTOCONF_WITH_VERSION }}.tar.gz ]; then
107- curl https://ftp.gnu.org/gnu/autoconf/${{ env.AUTOCONF_WITH_VERSION }}.tar.gz -o ${{ env.AUTOCONF_WITH_VERSION }}.tar.gz
108- fi
109- tar -xzf ${{ env.AUTOCONF_WITH_VERSION }}.tar.gz
110186 cd ${{ env.AUTOCONF_WITH_VERSION }}
111- ./configure --prefix=/usr
112- make -j $(nproc --all)
113187 make install
114188 cd ..
115189 autoconf --version
116190
117191 - name : Install updated version of bison
118192 run : |
119- if [ ! -f ${{ env.BISON_WITH_VERSION }}.tar.gz ]; then
120- curl https://ftp.gnu.org/gnu/bison/${{ env.BISON_WITH_VERSION }}.tar.gz -o ${{ env.BISON_WITH_VERSION }}.tar.gz
121- fi
122- tar -xzf ${{ env.BISON_WITH_VERSION }}.tar.gz
123193 cd ${{ env.BISON_WITH_VERSION }}
124- ./configure --prefix=/usr
125- make -j $(nproc --all)
126194 make install
127195 cd ..
128196 bison --version
129197
198+ - name : Install updated version of python
199+ run : |
200+ cd Python-${{ env.PYTHON_VERSION }}
201+ make install
202+ cd ..
203+ python3 --version
204+
205+ - name : Install python dependencies
206+ run : |
207+ python3 -m pip install --upgrade pip
208+ python3 -m pip install jinja2
209+
130210 - name : Install aws cli tool
131211 run : |
132212 curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
0 commit comments