File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build gdb from source
2+ inputs :
3+ arch :
4+ required : true
5+ runs :
6+ using : composite
7+ steps :
8+ - name : Try to restore cached gdb executable
9+ uses : actions/cache@v4
10+ with :
11+ path : /usr/local/bin/gdb
12+ key : gdb-${{ inputs.arch }}
13+
14+ - shell : bash
15+ run : |
16+ set -eux
17+
18+ if [[ -f /usr/local/bin/gdb ]]; then
19+ echo "Already cached"
20+ exit 0
21+ fi
22+
23+ sudo apt-get -yq install libmpfr-dev
24+
25+ cd ..
26+ curl -fL --retry 3 --max-time 60 -O https://mirrors.ocf.berkeley.edu/gnu/gdb/gdb-16.2.tar.xz
27+ tar xf gdb-16.2.tar.xz
28+
29+ cd gdb-16.2
30+ ./configure
31+ make -j$(nproc)
32+ sudo make install
33+ cd ..
34+
35+ rm -rf gdb-16.2 gdb-16.2.tar.xz
36+
37+ - shell : bash
38+ run : gdb --version
Original file line number Diff line number Diff line change @@ -153,19 +153,9 @@ jobs:
153153 arch : ${{ matrix.arch }}
154154 - name : ' Ubuntu 22: Build recent gdb from source' # see https://github.com/ldc-developers/ldc/issues/4389
155155 if : startsWith(matrix.os, 'ubuntu-22.04')
156- run : |
157- set -eux
158- cd ..
159- sudo apt-get -yq install libmpfr-dev
160- curl -fL --retry 3 --max-time 60 -O https://mirrors.ocf.berkeley.edu/gnu/gdb/gdb-16.2.tar.xz
161- tar xf gdb-16.2.tar.xz
162- cd gdb-16.2
163- ./configure
164- make -j$(nproc)
165- sudo make install
166- cd ..
167- rm -rf gdb-16.2 gdb-16.2.tar.xz
168- gdb --version
156+ uses : ./.github/actions/helper-build-gdb
157+ with :
158+ arch : ${{ matrix.arch }}
169159 - name : Build bootstrap LDC
170160 if : runner.os != 'macOS'
171161 uses : ./.github/actions/2-build-bootstrap
You can’t perform that action at this time.
0 commit comments