encoder: text: addressed previously missed uninitialized variable access #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build PR(s) and master branch. | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
types: [opened, reopened, synchronize] | |
jobs: | |
build-windows: | |
name: Build sources on amd64 for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, windows-2019] | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build on ${{ matrix.os }} with vs-2019 | |
run: | | |
.\scripts\win_build.bat | |
- name: Run unit tests. | |
run: | | |
ctest --rerun-failed --output-on-failure -C Debug --test-dir .\tests\ | |
build-centos: | |
name: CentOS 7 build to confirm no issues once used downstream | |
runs-on: ubuntu-latest | |
container: centos:7 | |
permissions: | |
contents: none | |
steps: | |
- name: Set up base image dependencies | |
run: | | |
sed -i -e "s/^mirrorlist=http:\/\/mirrorlist.centos.org/#mirrorlist=http:\/\/mirrorlist.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo | |
sed -i -e "s/^#baseurl=http:\/\/mirror.centos.org/baseurl=http:\/\/vault.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo | |
yum -y update && \ | |
yum install -y ca-certificates cmake curl-devel gcc gcc-c++ git make wget && \ | |
yum install -y epel-release | |
yum install -y cmake3 | |
shell: bash | |
- name: Clone repo without submodules (1.8.3 version of Git) | |
run: | | |
git clone https://github.com/fluent/cprofiles.git | |
shell: bash | |
- name: Check out the branch (1.8.3 version of Git) | |
env: | |
BRANCH_NAME: ${{ github.head_ref }} | |
run: | | |
git checkout "$BRANCH_NAME" | |
shell: bash | |
working-directory: cprofiles | |
- name: Fetch the appropriate sub modules | |
run: | | |
git submodule init | |
git submodule update | |
shell: bash | |
working-directory: cprofiles | |
- name: Run compilation | |
run: | | |
cmake3 -DCPROF_DEV=on ../ | |
make | |
shell: bash | |
working-directory: cprofiles/build | |
build-unix-arm64: | |
name: Build sources on arm64 for ${{ matrix.os }} - ${{ matrix.compiler }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
compiler: [ gcc, clang ] | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build on ${{ matrix.os }} with ${{ matrix.compiler }} | |
uses: uraimo/[email protected] | |
with: | |
arch: aarch64 | |
distro: ubuntu20.04 | |
run: | | |
apt-get update && \ | |
apt-get install -y --no-install-recommends \ | |
build-essential \ | |
cmake \ | |
file \ | |
make | |
export CC=${{ env.compiler }} | |
cd build | |
cmake -DCPROF_TESTS=On ../ | |
cmake --build . | |
CTEST_OUTPUT_ON_FAILURE=1 ctest | |
env: | |
CC: ${{ matrix.compiler }} | |
build-unix-amd64: | |
name: Build sources on amd64 for ${{ matrix.os }} - ${{ matrix.compiler }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
compiler: [ gcc, clang ] | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build on ${{ matrix.os }} with ${{ matrix.compiler }} | |
run: | | |
echo "CC = $CC, CXX = $CXX" | |
cmake -DCPROF_TESTS=On ../ | |
cmake --build . | |
CTEST_OUTPUT_ON_FAILURE=1 ctest | |
shell: bash | |
working-directory: build | |
env: | |
CC: ${{ matrix.compiler }} | |
build-analysis-tests: | |
name: Build with various code analysis tools | |
strategy: | |
fail-fast: false | |
matrix: | |
preset: | |
- clang-sanitize-address | |
- clang-sanitize-memory | |
- clang-sanitize-undefined | |
- clang-sanitize-dataflow | |
- clang-sanitize-safe-stack | |
- valgrind | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: docker://lpenz/ghaction-cmake:0.19 | |
with: | |
preset: ${{ matrix.preset }} | |
# dependencies_debian: '' | |
cmakeflags: '-DCPROF_TESTS=On -DCPROF_DEV=on .' | |
build_command: make all |