Skip to content

Commit

Permalink
Install libbacktrace on all platforms (except Ubuntu, which already h…
Browse files Browse the repository at this point in the history
…as it).
  • Loading branch information
bhaible committed May 19, 2024
1 parent 6195e5b commit babdd29
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 17 deletions.
49 changes: 33 additions & 16 deletions .github/workflows/many-platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,19 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: tarball
path: testdir-all.tar.gz
path: |
libbacktrace.tar.gz
testdir-all.tar.gz
if-no-files-found: error
retention-days: 7
compression-level: 0
overwrite: true
- uses: actions/upload-artifact@v4
with:
name: tarball-for-mingw
path: testdir-all-for-mingw.tar.gz
path: |
libbacktrace.tar.gz
testdir-all-for-mingw.tar.gz
if-no-files-found: error
retention-days: 7
compression-level: 0
Expand Down Expand Up @@ -110,14 +114,15 @@ jobs:
- run: |
pwd
export CPPFLAGS="-Wall"
./build-on.sh 'testdir-all' '' 'make'
./build-on.sh 'testdir-all' '' 'make' ''
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: logs-linux-gnu-ubuntu
path: |
libbacktrace/log[124]
testdir-all/build/config.cache
testdir-all/build/config.log
testdir-all/build/config.status
Expand Down Expand Up @@ -152,14 +157,15 @@ jobs:
cd /work
ls -l
export CPPFLAGS="-Wall"
./build-on.sh 'testdir-all' '' 'make'
./build-on.sh 'testdir-all' '' 'make' 'libbacktrace'
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: logs-linux-gnu-centos
path: |
libbacktrace/log[124]
testdir-all/build/config.cache
testdir-all/build/config.log
testdir-all/build/config.status
Expand Down Expand Up @@ -194,14 +200,15 @@ jobs:
cd /work
ls -l
export CPPFLAGS="-Wall"
./build-on.sh 'testdir-all' '' 'make'
./build-on.sh 'testdir-all' '' 'make' 'libbacktrace'
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: logs-linux-alpine
path: |
libbacktrace/log[124]
testdir-all/build/config.cache
testdir-all/build/config.log
testdir-all/build/config.status
Expand Down Expand Up @@ -236,14 +243,15 @@ jobs:
- run: |
pwd
export CPPFLAGS="-Wall"
./build-on.sh 'testdir-all' '' 'make'
./build-on.sh 'testdir-all' '' 'make' 'libbacktrace'
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.os }}
path: |
libbacktrace/log[124]
testdir-all/build/config.cache
testdir-all/build/config.log
testdir-all/build/config.status
Expand Down Expand Up @@ -279,18 +287,19 @@ jobs:
pwd
: "Install FreeBSD packages"
: "List of packages: https://ports.freebsd.org/cgi/ports.cgi"
: pkg install -y ...
pkg install -y libbacktrace
ls -l
export CPPFLAGS="-I/usr/local/include -Wall"
export LDFLAGS="-L/usr/local/lib"
./build-on.sh 'testdir-all' '' 'make'
./build-on.sh 'testdir-all' '' 'make' ''
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: logs-freebsd
path: |
libbacktrace/log[124]
testdir-all/build/config.cache
testdir-all/build/config.log
testdir-all/build/config.status
Expand Down Expand Up @@ -331,14 +340,15 @@ jobs:
ls -l
export CPPFLAGS="-I/usr/pkg/include -Wall"
export LDFLAGS="-L/usr/pkg/lib"
./build-on.sh 'testdir-all' '' 'make'
./build-on.sh 'testdir-all' '' 'make' 'libbacktrace'
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: logs-netbsd
path: |
libbacktrace/log[124]
testdir-all/build/config.cache
testdir-all/build/config.log
testdir-all/build/config.status
Expand Down Expand Up @@ -381,14 +391,15 @@ jobs:
ls -l
export CPPFLAGS="-I/usr/local/include -Wall"
export LDFLAGS="-L/usr/local/lib"
./build-on.sh 'testdir-all' '' 'gmake'
./build-on.sh 'testdir-all' '' 'gmake' 'libbacktrace'
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: logs-openbsd
path: |
libbacktrace/log[124]
testdir-all/build/config.cache
testdir-all/build/config.log
testdir-all/build/config.status
Expand Down Expand Up @@ -431,14 +442,15 @@ jobs:
export CPPFLAGS="-Wall"
export CC="gcc -m64"
export CXX="gcc -m64"
./build-on.sh 'testdir-all' '' 'make'
./build-on.sh 'testdir-all' '' 'make' 'libbacktrace'
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: logs-solaris11
path: |
libbacktrace/log[124]
testdir-all/build/config.cache
testdir-all/build/config.log
testdir-all/build/config.status
Expand Down Expand Up @@ -477,14 +489,15 @@ jobs:
pwd
ls -l
export CPPFLAGS="-Wall"
./build-on.sh 'testdir-all' '' 'gmake'
./build-on.sh 'testdir-all' '' 'gmake' 'libbacktrace'
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: logs-solaris11-omnios
path: |
libbacktrace/log[124]
testdir-all/build/config.cache
testdir-all/build/config.log
testdir-all/build/config.status
Expand Down Expand Up @@ -540,14 +553,15 @@ jobs:
- name: Build in Cygwin
run: |
export CPPFLAGS="-Wall"
./build-on.sh 'testdir-all' '' 'make'
./build-on.sh 'testdir-all' '' 'make' 'libbacktrace'
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: logs-cygwin${{ matrix.bitness }}
path: |
libbacktrace/log[124]
testdir-all/build/config.cache
testdir-all/build/config.log
testdir-all/build/config.status
Expand Down Expand Up @@ -607,14 +621,15 @@ jobs:
export CPPFLAGS="-Wall"
export CC=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32-gcc
export CXX=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32-g++
./build-on.sh 'testdir-all-for-mingw' '--host=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32' 'make'
./build-on.sh 'testdir-all-for-mingw' '--host=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32' 'make' 'libbacktrace'
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: logs-mingw${{ matrix.bitness }}
path: |
libbacktrace/log[124]
testdir-all/build/config.cache
testdir-all/build/config.log
testdir-all/build/config.status
Expand Down Expand Up @@ -709,14 +724,15 @@ jobs:
export STRIP=":"
export AR="`pwd`/ar-lib lib"
export RANLIB=":"
./build-on.sh 'testdir-all-for-mingw' '--host=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32' 'make'
./build-on.sh 'testdir-all-for-mingw' '--host=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32' 'make' 'libbacktrace'
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: logs-msvc${{ matrix.bitness }}
path: |
libbacktrace/log[124]
testdir-all/build/config.cache
testdir-all/build/config.log
testdir-all/build/config.status
Expand Down Expand Up @@ -752,14 +768,15 @@ jobs:
export CXX="clang++ -fsanitize=address,undefined,signed-integer-overflow,shift,integer-divide-by-zero"
export CXXFLAGS="-O0 -fno-omit-frame-pointer -ggdb"
export ASAN_OPTIONS="detect_leaks=0 abort_on_error=1 allocator_may_return_null=1"
./build-on.sh 'testdir-all' '' 'make'
./build-on.sh 'testdir-all' '' 'make' ''
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: logs-sanitized
path: |
libbacktrace/log[124]
testdir-all/build/config.cache
testdir-all/build/config.log
testdir-all/build/config.status
Expand Down
11 changes: 11 additions & 0 deletions build-on.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,20 @@
package="$1"
configure_options="$2"
make="$3"
prerequisites="$4"

set -x

# Build and install the prerequisites.
for prereq in $prerequisites; do
tar xfz $prereq.tar.gz
cd $prereq
./configure $configure_options > log1 2>&1; rc=$?; cat log1; test $rc = 0 || exit 1
$make > log2 2>&1; rc=$?; cat log2; test $rc = 0 || exit 1
$make install > log4 2>&1; rc=$?; cat log4; test $rc = 0 || exit 1
cd ..
done

# Unpack the tarball.
tarfile="$package".tar.gz
packagedir=`echo "$tarfile" | sed -e 's/\.tar\.gz$//'`
Expand Down
7 changes: 6 additions & 1 deletion build-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,19 @@

# This script builds the package.
# Usage: build-tarball.sh PACKAGE
# Its output is two tarballs:
# Its output is three tarballs:
# - libbacktrace.tar.gz
# - testdir-all.tar.gz
# - testdir-all-for-mingw.tar.gz

package="$1"

set -e

# Fetch prerequisite sources (uses package 'git').
git clone --depth 1 https://github.com/ianlancetaylor/libbacktrace.git
tar cfz libbacktrace.tar.gz libbacktrace

# Fetch sources (uses package 'git').
git clone --depth 1 https://git.savannah.gnu.org/git/"$package".git
cd "$package"
Expand Down

0 comments on commit babdd29

Please sign in to comment.