| 1 |
name: full-check |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
jobs: |
| 6 |
build: |
| 7 |
strategy: |
| 8 |
fail-fast: false |
| 9 |
matrix: |
| 10 |
include: |
| 11 |
- cc: gcc-14 |
| 12 |
clang_major_version: null |
| 13 |
runs-on: ubuntu-24.04 |
| 14 |
- cc: gcc-15 |
| 15 |
clang_major_version: null |
| 16 |
runs-on: ubuntu-24.04 |
| 17 |
- cc: clang-19 |
| 18 |
clang_major_version: 19 |
| 19 |
runs-on: ubuntu-22.04 |
| 20 |
- cc: musl-gcc |
| 21 |
clang_major_version: null |
| 22 |
runs-on: ubuntu-24.04 |
| 23 |
|
| 24 |
runs-on: ${{ matrix.runs-on }} |
| 25 |
|
| 26 |
steps: |
| 27 |
- uses: actions/checkout@v4 |
| 28 |
- name: gcc_15_repo |
| 29 |
if: "${{ matrix.cc == 'gcc-15' }}" |
| 30 |
run: | |
| 31 |
set -x |
| 32 |
# NOTE: plucky is 25.04 (not 24.04 LTS) |
| 33 |
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ plucky main universe' |
| 34 |
- name: gcc_15_install |
| 35 |
if: "${{ matrix.cc == 'gcc-15' }}" |
| 36 |
run: | |
| 37 |
set -x |
| 38 |
sudo apt-get install --yes --no-install-recommends -V \ |
| 39 |
binutils \ |
| 40 |
gcc-15 |
| 41 |
apt-cache policy binutils |
| 42 |
- name: clang_repo |
| 43 |
if: "${{ contains(matrix.cc, 'clang') }}" |
| 44 |
run: | |
| 45 |
set -x |
| 46 |
source /etc/os-release |
| 47 |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - |
| 48 |
sudo add-apt-repository "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-${{ matrix.clang_major_version }} main" |
| 49 |
- name: clang_install |
| 50 |
if: "${{ contains(matrix.cc, 'clang') }}" |
| 51 |
run: |- |
| 52 |
sudo apt-get update |
| 53 |
sudo apt-get install --yes --no-install-recommends -V \ |
| 54 |
clang-${{ matrix.clang_major_version }} \ |
| 55 |
libclang-rt-${{ matrix.clang_major_version }}-dev |
| 56 |
- name: musl_tools_install |
| 57 |
if: "${{ contains(matrix.cc, 'musl') }}" |
| 58 |
run: |- |
| 59 |
sudo apt-get update |
| 60 |
sudo apt-get install --yes --no-install-recommends -V \ |
| 61 |
musl-tools |
| 62 |
- name: first_build |
| 63 |
run: | |
| 64 |
./autogen.sh |
| 65 |
./configure CC=${{ matrix.cc }} CFLAGS='-std=c99 -Wall -Wextra -pedantic' \ |
| 66 |
|| { cat config.log ; false ; } |
| 67 |
make |
| 68 |
sudo make install |
| 69 |
sudo make uninstall |
| 70 |
make distclean |
| 71 |
- name: second_build |
| 72 |
run: | |
| 73 |
configure_args=( |
| 74 |
CC=${{ matrix.cc }} |
| 75 |
) |
| 76 |
|
| 77 |
if [[ "${{ matrix.cc }}" != musl-gcc ]]; then |
| 78 |
configure_args+=( |
| 79 |
CFLAGS='-g -fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer' |
| 80 |
LDFLAGS='-g -fsanitize=address,undefined' |
| 81 |
) |
| 82 |
fi |
| 83 |
|
| 84 |
./autogen.sh |
| 85 |
./configure "${configure_args[@]}" \ |
| 86 |
|| { cat config.log ; false ; } |
| 87 |
make |
| 88 |
sudo make install |
| 89 |
- name: run_program |
| 90 |
run: | |
| 91 |
set -x |
| 92 |
dcfldd if=.github/workflows/test.txt of=/tmp/test2.txt hash=md5,sha1,sha256,sha384,sha512 2>.github/workflows/actual-stderr.txt |
| 93 |
diff -u .github/workflows/{actual,expected}-stderr.txt |
| 94 |
ls -lh /tmp/test2.txt |
| 95 |
head -n3 /tmp/test2.txt | grep -i autopkgtest |
| 96 |
- name: test_make_dist |
| 97 |
run: | |
| 98 |
make distclean |
| 99 |
./autogen.sh |
| 100 |
./configure CC=${{ matrix.cc }} |
| 101 |
make dist |
| 102 |
mkdir test_dist |
| 103 |
mv dcfldd-*.tar.gz test_dist |
| 104 |
cd test_dist |
| 105 |
pwd |
| 106 |
tar -xvf dcfldd-*.tar.gz |
| 107 |
rm -f dcfldd-*.tar.gz |
| 108 |
cd dcfldd-* |
| 109 |
./autogen.sh |
| 110 |
./configure CC=${{ matrix.cc }} --with-bash-completion |
| 111 |
make |
| 112 |
ls |
| 113 |
sudo make install |
| 114 |
sudo make uninstall |
| 115 |
make distclean |