Skip to content

Commit

Permalink
fix(tests): check_types_builtin_xml Linux 32bit
Browse files Browse the repository at this point in the history
* extend Matrix Build
  • Loading branch information
NoelGraf authored and jpfr committed Jan 21, 2024
1 parent 7f97400 commit d3e148a
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 24 deletions.
79 changes: 58 additions & 21 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ jobs:
"Debug Build & Unit Tests with Diagnostics (gcc)",
"Debug Build & Unit Tests with multithreading (gcc)",
"Debug Build & Unit Tests with Alarms&Conditions (gcc)",
"Debug Build & Unit Tests (clang)",
"Debug Build & Unit Tests (clang-11)",
"Debug Build & Unit Tests (clang-14)",
"Debug Build & Unit Tests (tcc)",
"Encryption (MbedTLS) Build & Unit Tests (gcc)",
"PubSub Encryption (MbedTLS) Build & Unit Tests (gcc)",
"PubSub SKS Build & Unit Tests (gcc)",
"Encryption (OpenSSL) Build & Unit Tests (gcc)",
"Encryption (LibreSSL) Build & Unit Tests (gcc)",
"TPM Tool Build",
"TPM Tool Build 20.04",
"TPM Tool Build 22.04",
"Release Build",
"Amalgamation Build",
"Amalgamation Build with Multithreading",
Expand All @@ -32,16 +34,16 @@ jobs:
"Valgrind Examples with OpenSSL (gcc)",
"Clang Static Analyzer",
"Build All Companion Specifications"
]
]
include:
- build_name: "Debug Build & Unit Tests (gcc)"
cmd_deps: sudo apt-get install -y -qq mosquitto
cmd_action: unit_tests
- build_name: "Debug Build & Unit Tests (gcc, 32bit)"
cmd_deps: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y -qq gcc-multilib libsubunit-dev:i386 check:i386 libxml2-dev:i386
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y -qq gcc-multilib libsubunit-dev:i386 check:i386 libxml2-dev:i386
cmd_action: unit_tests_32
- build_name: "Debug Build & Unit Tests without Subscriptions (gcc)"
cmd_deps: ""
Expand All @@ -55,9 +57,14 @@ jobs:
- build_name: "Debug Build & Unit Tests with Alarms&Conditions (gcc)"
cmd_deps: ""
cmd_action: unit_tests_alarms
- build_name: "Debug Build & Unit Tests (clang)"
- build_name: "Debug Build & Unit Tests (clang-11)"
runs_on: "ubuntu-20.04"
cmd_deps: sudo apt-get install -y -qq clang-11 clang-tools-11 mosquitto
cmd_action: CC=clang-11 CXX=clang++-11 unit_tests
- build_name: "Debug Build & Unit Tests (clang-14)"
runs_on: "ubuntu-22.04"
cmd_deps: sudo apt-get install -y -qq clang-14 clang-tools-14 mosquitto
cmd_action: CC=clang-14 CXX=clang++-14 unit_tests
- build_name: "Debug Build & Unit Tests (tcc)"
cmd_deps: sudo apt-get install -y -qq tcc mosquitto
cmd_action: CC=tcc unit_tests
Expand All @@ -82,7 +89,8 @@ jobs:
./configure
sudo make install
cmd_action: unit_tests_encryption LIBRESSL
- build_name: "TPM Tool Build"
- build_name: "TPM Tool Build 20.04"
runs_on: "ubuntu-20.04"
cmd_deps: |
sudo apt-get install -y -qq acl autoconf autoconf-archive automake build-essential cmake doxygen gcc git iproute2 libcurl4-openssl-dev libjson-c-dev libcmocka0 libcmocka-dev libgcrypt20-dev libglib2.0-dev libini-config-dev libmbedtls-dev libssl-dev libsqlite3-dev libtool libyaml-dev pkg-config procps python3-pip sqlite3 udev uthash-dev
cd ${HOME}
Expand All @@ -108,6 +116,33 @@ jobs:
sudo pip3 install pyasn1_modules
pip3 install .
cmd_action: build_tpm_tool
- build_name: "TPM Tool Build 22.04"
runs_on: "ubuntu-22.04"
cmd_deps: |
sudo apt-get install -y -qq acl autoconf autoconf-archive automake build-essential cmake doxygen gcc git iproute2 libcurl4-openssl-dev libjson-c-dev libcmocka0 libcmocka-dev libgcrypt20-dev libglib2.0-dev libini-config-dev libmbedtls-dev libssl-dev libsqlite3-dev libtool libyaml-dev pkg-config procps python3-pip sqlite3 udev uthash-dev
cd ${HOME}
git clone https://github.com/tpm2-software/tpm2-tss.git
cd ${HOME}/tpm2-tss
git checkout 3.2.2
./bootstrap && ./configure --with-udevrulesdir=/etc/udev/rules.d --with-udevrulesprefix=70-
make -j$(nproc)
sudo make install
sudo ldconfig
sudo udevadm control --reload-rules && sudo udevadm trigger
sudo apt-get install -y -qq tpm2-tools opensc
cd ${HOME}
git clone https://github.com/tpm2-software/tpm2-pkcs11.git
cd ${HOME}/tpm2-pkcs11
git checkout 1.7.0
./bootstrap && ./configure
make -j$(nproc)
sudo make install
sudo ldconfig
sudo cp ${HOME}/tpm2-pkcs11/src/pkcs11.h /usr/include
cd ${HOME}/tpm2-pkcs11/tools/
sudo pip3 install pyasn1_modules
pip3 install .
cmd_action: build_tpm_tool
- build_name: "Release Build"
cmd_deps: sudo apt-get install -y -qq libmbedtls-dev
cmd_action: build_release
Expand Down Expand Up @@ -137,17 +172,19 @@ jobs:
cmd_action: build_all_companion_specs

name: ${{matrix.os}}-${{matrix.build_name}}
runs-on: ${{matrix.os}}
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y -qq python3-sphinx graphviz check
${{ matrix.cmd_deps }}
- name: ${{matrix.build_name}}
run: source tools/ci.sh && ${{matrix.cmd_action}}
env:
ETHERNET_INTERFACE: eth0
- uses: actions/checkout@v3
with:
submodules: true
- name: Install Dependencies
if: ${{ matrix.runs_on == '' || matrix.runs_on == matrix.os }}
run: |
sudo apt-get update
sudo apt-get install -y -qq python3-sphinx graphviz check
${{ matrix.cmd_deps }}
- name: ${{matrix.build_name}}
if: ${{ matrix.runs_on == '' || matrix.runs_on == matrix.os }}
run: source tools/ci.sh && ${{matrix.cmd_action}}
env:
ETHERNET_INTERFACE: eth0
6 changes: 3 additions & 3 deletions tests/check_types_builtin_xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,7 @@ START_TEST(UA_Float_xml_nan_decode) {
UA_StatusCode retval = UA_decodeXml(&buf, &out, &UA_TYPES[UA_TYPES_FLOAT], NULL);

ck_assert_int_eq(retval, UA_STATUSCODE_GOOD);
#if !defined(__TINYC__) && (defined(__clang__) || (!defined(__aarch64__) && !defined(__amd64__)))
#if !defined(__TINYC__) && (defined(__clang__) || ((!defined(__aarch64__) && !defined(__amd64__)) && ((defined(__GNUC__) && __GNUC__ < 11))))
// gcc 32-bit and linux clang specific
// 0 11111111 10000000000000000000000
// 7f c0 00 00
Expand Down Expand Up @@ -1803,10 +1803,10 @@ START_TEST(UA_Double_nan_xml_decode) {
UA_StatusCode retval = UA_decodeXml(&buf, &out, &UA_TYPES[UA_TYPES_DOUBLE], NULL);

ck_assert_int_eq(retval, UA_STATUSCODE_GOOD);
#if !defined(__TINYC__) && (defined(__clang__) || (!defined(__aarch64__) && !defined(__amd64__)))
#if !defined(__TINYC__) && (defined(__clang__) || ((!defined(__aarch64__) && !defined(__amd64__)) && ((defined(__GNUC__) && __GNUC__ < 11))))
// gcc 32-bit and linux clang specific
// 0 11111111111 1000000000000000000000000000000000000000000000000000
// ff f8 00 00 00 00 00 00
// 7f f8 00 00 00 00 00 00
ck_assert_int_eq(((u8*)&out)[0], 0x00);
ck_assert_int_eq(((u8*)&out)[1], 0x00);
ck_assert_int_eq(((u8*)&out)[2], 0x00);
Expand Down

0 comments on commit d3e148a

Please sign in to comment.