Skip to content

Commit 06665e7

Browse files
authored
Merge pull request #8719 from tautschnig/bsd-actions
Update *BSD CI actions to the latest OS versions
2 parents 0047c36 + 296e111 commit 06665e7

File tree

4 files changed

+50
-19
lines changed

4 files changed

+50
-19
lines changed

.github/workflows/bsd.yaml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ jobs:
1818
with:
1919
save-always: true
2020
path: .ccache
21-
key: freebsd-13.2-gmake-${{ github.ref }}-${{ github.sha }}-PR
21+
key: freebsd-15.0-gmake-${{ github.ref }}-${{ github.sha }}-PR
2222
restore-keys: |
23-
freebsd-13.2-gmake-${{ github.ref }}
24-
freebsd-13.2-gmake
23+
freebsd-15.0-gmake-${{ github.ref }}
24+
freebsd-15.0-gmake
2525
- name: ccache environment
2626
run: |
2727
echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV
2828
echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV
2929
- name: Build and Test
3030
uses: vmactions/freebsd-vm@v1
3131
with:
32-
release: 13.2
32+
release: "15.0"
3333
usesh: true
3434
run: |
3535
# apparently fail-on-error isn't the default here
@@ -49,7 +49,10 @@ jobs:
4949
gmake -C src -j2 CXX="ccache clang++"
5050
# gmake -C jbmc/src setup-submodules
5151
# gmake -C jbmc/src -j2 CXX="ccache clang++"
52-
gmake -C unit "CXX=ccache clang++"
52+
# https://github.com/catchorg/Catch2/issues/2910 is an issue
53+
# specific to Clang/LLVM 19 (which is what FreeBSD 15 ships)
54+
gmake -C unit "CXX=ccache clang++" \
55+
CXXFLAGS="-Wall -pedantic -Werror -Wswitch-enum -Wno-deprecated-declarations -Wno-c++20-extensions"
5356
# gmake -C jbmc/unit "CXX=ccache clang++"
5457
echo "Print ccache stats"
5558
ccache -s
@@ -80,18 +83,18 @@ jobs:
8083
with:
8184
save-always: true
8285
path: .ccache
83-
key: openbsd-7.6-gmake-${{ github.ref }}-${{ github.sha }}-PR
86+
key: openbsd-7.7-gmake-${{ github.ref }}-${{ github.sha }}-PR
8487
restore-keys: |
85-
openbsd-7.6-gmake-${{ github.ref }}
86-
openbsd-7.6-gmake
88+
openbsd-7.7-gmake-${{ github.ref }}
89+
openbsd-7.7-gmake
8790
- name: ccache environment
8891
run: |
8992
echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV
9093
echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV
9194
- name: Build and Test
9295
uses: vmactions/openbsd-vm@v1
9396
with:
94-
release: 7.6
97+
release: "7.7"
9598
run: |
9699
# apparently fail-on-error isn't the default here
97100
set -e -x
@@ -142,23 +145,23 @@ jobs:
142145
with:
143146
save-always: true
144147
path: .ccache
145-
key: netbsd-9.3-gmake-${{ github.ref }}-${{ github.sha }}-PR
148+
key: netbsd-10.1-gmake-${{ github.ref }}-${{ github.sha }}-PR
146149
restore-keys: |
147-
netbsd-9.3-gmake-${{ github.ref }}
148-
netbsd-9.3-gmake
150+
netbsd-10.1-gmake-${{ github.ref }}
151+
netbsd-10.1-gmake
149152
- name: ccache environment
150153
run: |
151154
echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV
152155
echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV
153156
- name: Build and Test
154157
uses: vmactions/netbsd-vm@v1
155158
with:
156-
release: 9.3
159+
release: "10.1"
157160
run: |
158161
# apparently fail-on-error isn't the default here
159162
set -e -x
160163
echo "Fetch dependencies"
161-
pkg_add -v bash gmake git python311 patch flex bison ccache parallel z3 gcc10
164+
pkg_add -v gmake git python311 patch flex bison ccache parallel z3 gcc10
162165
ln -s $(which python3.11) /usr/pkg/bin/python3
163166
export PATH=/usr/pkg/gcc10/bin:$PATH
164167
echo "Fetch JBMC dependencies"

COMPILING.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@ integration system. It separately tests both the CMake build system and the
1212
hand-written make files. The latest build steps being used in CI can be
1313
[found here](https://github.com/diffblue/cbmc/blob/develop/.github/workflows/pull-request-checks.yaml).
1414

15-
The environments below have been used successfully in the
16-
past, but are not actively tested:
17-
18-
- Solaris 11
19-
- FreeBSD 13
15+
The Solaris 11 environment below has been used successfully in the past, but is
16+
not actively tested.
2017

2118
# Building using CMake
2219

regression/cbmc/gcc_vector3/main.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@ void test_shufflevector(void)
4242

4343
vector_u res;
4444

45+
# if defined(__clang__)
46+
// None of the indices refers to the second vector, so we can safely make it
47+
// non-deterministic.
48+
res.v = __builtin_shufflevector(
49+
a, __builtin_nondeterministic_value(a), 0, 1, -1, 3);
50+
# else
4551
res.v = __builtin_shufflevector(a, a, 0, 1, -1, 3);
52+
# endif
4653
assert(res.members[0] == 1);
4754
assert(res.members[1] == 2);
4855
// res.members[2] is "don't care"

src/ansi-c/c_typecheck_expr.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2183,6 +2183,30 @@ void c_typecheck_baset::typecheck_side_effect_function_call(
21832183

21842184
return;
21852185
}
2186+
else if(
2187+
identifier == "__builtin_nondeterministic_value" &&
2188+
config.ansi_c.mode == configt::ansi_ct::flavourt::CLANG)
2189+
{
2190+
// From Clang's documentation:
2191+
// Each call to __builtin_nondeterministic_value returns a valid value
2192+
// of the type given by the argument.
2193+
// Clang only supports integer types, floating-point types, vector
2194+
// types.
2195+
if(expr.arguments().size() != 1)
2196+
{
2197+
error().source_location = f_op.source_location();
2198+
error() << "__builtin_nondeterministic_value expects one operand"
2199+
<< eom;
2200+
throw 0;
2201+
}
2202+
typecheck_expr(expr.arguments().front());
2203+
2204+
side_effect_expr_nondett result{
2205+
expr.arguments().front().type(), f_op.source_location()};
2206+
expr.swap(result);
2207+
2208+
return;
2209+
}
21862210
else if(
21872211
identifier == "__builtin_shuffle" &&
21882212
config.ansi_c.mode == configt::ansi_ct::flavourt::GCC)

0 commit comments

Comments
 (0)