Skip to content

Commit

Permalink
fix workflows and remove soon to be EOL release
Browse files Browse the repository at this point in the history
update workflows to give better feedback in logs
remove ubuntu 20.04 that will be EOL 25.04
add ubuntu 24.04
update mac workflow so it works in latest macos
update 32bit build so it works with xxhash
update github action versions

Signed-off-by: Robert Marklund <[email protected]>
  • Loading branch information
trollkarlen committed Jan 10, 2025
1 parent 9e5d7a3 commit 30e7185
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: [push, pull_request]
jobs:
build:
name: Runs cppcheck
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- name: checkout
Expand All @@ -17,7 +17,7 @@ jobs:
run: cppcheck/run_cppcheck.sh
- name: store the cppcheck output as an artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: 'cppcheck/out/*'

4 changes: 2 additions & 2 deletions .github/workflows/deterministic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: [push, pull_request]
jobs:
build:
name: Runs the deterministic operation test
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- name: checkout
Expand All @@ -23,7 +23,7 @@ jobs:
run: testcases/verify_deterministic_operation.sh
- name: store logs as artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: '**/*.log'

2 changes: 1 addition & 1 deletion .github/workflows/gcc12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: make check
- name: store the logs as an artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: '**/*.log'

2 changes: 1 addition & 1 deletion .github/workflows/gcc13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: make check
- name: store the logs as an artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: '**/*.log'

12 changes: 6 additions & 6 deletions .github/workflows/gcc11.yml → .github/workflows/gcc14.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name: gcc 11
name: gcc 14

on: [push, pull_request]


jobs:
build:
name: Compiles with gcc 11
runs-on: ubuntu-20.04
name: Compiles with gcc 14
runs-on: ubuntu-24.04

steps:
- name: checkout
uses: actions/checkout@v3
- name: install packages
run: sudo apt install build-essential nettle-dev libxxhash-dev time gcc-11 g++-11
run: sudo apt install build-essential nettle-dev libxxhash-dev time gcc-14 g++-14
- name: bootstrap
run: ./bootstrap.sh
- name: configure
run: ./configure CXX=g++-11
run: ./configure CXX=g++-14
- name: build
run: make
- name: check
run: make check
- name: store the logs as an artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: '**/*.log'

8 changes: 4 additions & 4 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ jobs:
- name: checkout
uses: actions/checkout@v3
- name: install packages
run: brew install libnettle automake autoconf
run: brew install nettle xxhash automake autoconf
- name: bootstrap
run: ./bootstrap.sh
- name: configure
run: ./configure --enable-warnings CXXFLAGS=-std=c++11
run: ./configure --enable-warnings CXXFLAGS="-std=c++11 -I$(brew --prefix nettle)/include -I$(brew --prefix xxhash)/include -L$(brew --prefix nettle)/lib -L$(brew --prefix xxhash)/lib"
- name: make
run: make
# tests fail because readlink does not understand -f on mac
# tests fail because readlink does not understand -f on mac
# - name: make check
# run: make check
# - name: make distcheck
# run: make distcheck CXXFLAGS=-std=c++11
- name: Upload a Build Artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: '**/*.log'
4 changes: 2 additions & 2 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: [push, pull_request]
jobs:
build:
name: Runs the quality script
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: checkout
Expand All @@ -17,7 +17,7 @@ jobs:
run: ./do_quality_checks.sh
- name: store logs as artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: '**/*.log'

2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-22.04, ubuntu-24.04]

steps:
- name: checkout
Expand Down
71 changes: 60 additions & 11 deletions do_quality_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ compile_and_test_standard() {
fi
if ! /usr/bin/time --format=%e --output=time.log make >make.log 2>&1; then
echo $me: failed make
tail -n 50 make.log
exit 1
fi
if [ ! -z $MEASURE_COMPILE_TIME ] ; then
Expand All @@ -91,6 +92,7 @@ compile_and_test_standard() {
#run the tests
if ! make check >makecheck.log 2>&1 ; then
echo $me: failed make check - see makecheck.log
tail -n 50 makecheck.log
exit 1
fi
}
Expand Down Expand Up @@ -133,8 +135,8 @@ get_latest_clang() {
for ver in $(seq 30 -1 10); do
candidate=clang++-$ver
if which $candidate >/dev/null 2>&1; then
latestclang=$candidate
return
latestclang=$candidate
return
fi
done
if which clang++ >/dev/null 2>&1; then
Expand Down Expand Up @@ -269,37 +271,84 @@ build_32bit() {
echo $me: "trying to compile in 32 bit mode with -m32..."
configureflags="--build=i686-pc-linux-gnu CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32"
here=$(pwd)
nettleversion=3.7.3
nettleinstall=$here/nettle32bit
if [ -d "$nettleinstall" ] ; then
if [ -f "$nettleinstall/include/nettle/sha.h" ] ; then
echo $me: "local nettle already seems to be installed"
else
mkdir "$nettleinstall"
mkdir -p "$nettleinstall"
cd "$nettleinstall"
nettleversion=3.7.3
echo "$me: downloading nettle from gnu.org..."
wget --quiet https://ftp.gnu.org/gnu/nettle/nettle-$nettleversion.tar.gz
echo "661f5eb03f048a3b924c3a8ad2515d4068e40f67e774e8a26827658007e3bcf0 nettle-$nettleversion.tar.gz" >checksum
echo "$me: verify checksum..."
sha256sum --strict --quiet -c checksum
tar xzf nettle-$nettleversion.tar.gz
cd nettle-$nettleversion
echo $me: trying to configure nettle
./configure $configureflags --prefix="$nettleinstall" >$here/nettle.configure.log 2>&1
make install >$here/nettle.install.log 2>&1
echo $me: "local nettle install went ok"
echo $me: local nettle install went ok
cd $here
fi
./bootstrap.sh >bootstrap.log 2>&1

xxhashversion=0.8.3
xxhashinstall=$here/xxhash32bit
if [ -f "$xxhashinstall/include/xxhash.h" ] ; then
echo $me: "local xxhash already seems to be installed"
else
mkdir -p "$xxhashinstall"
cd "$xxhashinstall"
echo "$me: downloading xxhash..."
wget -v https://github.com/Cyan4973/xxHash/archive/refs/tags/v$xxhashversion.tar.gz -O xxHash-$xxhashversion.tar.gz
echo "aae608dfe8213dfd05d909a57718ef82f30722c392344583d3f39050c7f29a80 xxHash-$xxhashversion.tar.gz" >checksum
echo "$me: verify checksum..."
sha256sum --strict --quiet -c checksum
tar xzf xxHash-$xxhashversion.tar.gz
cd xxHash-$xxhashversion
echo $me: trying to make xxhash
# ./configure $configureflags --prefix="$xxhashinstall" >$here/xxhash.configure.log 2>&1
if ! make install PREFIX="$xxhashinstall" CFLAGS="-m32 -shared" LDFLAGS="-m32" >$here/xxhash.install.log 2>&1; then
RET="$?"
echo "$me: make failed"
tail -n 50 $here/xxhash.install.log
exit $RET
fi
echo $me: local xxhash install went ok
cd $here
fi
echo $me: running bootstrap
if ! ./bootstrap.sh >bootstrap.log 2>&1; then
RET="$?"
echo "$me: bootstrap failed"
tail -n 50 bootstrap.log
return $RET
fi
echo "$me: attempting configure with 32 bit flags... (see configure.log if it fails)"
./configure --build=i686-pc-linux-gnu CFLAGS=-m32 CXXFLAGS="-m32 -I$nettleinstall/include" LDFLAGS="-m32 -L$nettleinstall/lib" >configure.log 2>&1
if ! ./configure --build=i686-pc-linux-gnu CFLAGS=-m32 CXXFLAGS="-m32 -I$nettleinstall/include -I$xxhashinstall/include" LDFLAGS="-m32 -L$nettleinstall/lib -L$xxhashinstall/lib" >configure.log 2>&1; then
RET="$?"
echo "$me: configure failed"
tail -n 50 configure.log
exit $RET
fi
echo "$me: building with 32 bit flags... (check make.log if it fails)"
make >make.log 2>&1
if ! make >make.log 2>&1; then
RET="$?"
echo "$me: building failed"
tail -n 50 make.log
exit $RET
fi
echo "$me: make check with 32 bit flags... (check make-check.log if it fails)"
LD_LIBRARY_PATH=$nettleinstall/lib make check >make-check.log 2>&1
if ! LD_LIBRARY_PATH=$nettleinstall/lib:$xxhashinstall/lib make check >make-check.log 2>&1; then
RET="$?"
echo "$me: make check failed"
tail -n 50 make-check.log
exit $RET
fi
echo "$me: 32 bit tests went fine!"
}
###############################################################################


#this is pretty quick so start with it.
verify_self_contained_headers

Expand Down

0 comments on commit 30e7185

Please sign in to comment.