Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git
build
lib/cfl/build-review
95 changes: 34 additions & 61 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,20 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest]
os: [windows-latest, windows-2022]
permissions:
contents: read
steps:
- uses: actions/checkout@v7
with:
submodules: true

- name: Build on ${{ matrix.os }}
- name: Set up with Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@v1
with:
toolset: 14.29 # For using VS2019 C++

- name: Build on ${{ matrix.os }} with vs-2019
run: |
.\scripts\win_build.bat

Expand All @@ -33,61 +38,41 @@ jobs:
build-centos:
name: CentOS 7 build to confirm no issues once used downstream
runs-on: ubuntu-latest
container: centos:7
env:
# workaround required for checkout@v3, https://github.com/actions/checkout/issues/1590
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
permissions:
contents: read
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 gcc gcc-c++ git make wget
yum install -y epel-release
yum install -y libcurl-devel

shell: bash

- name: Install CMake 3.20.0
run: |
CMAKE_VERSION=3.20.0
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh
chmod +x cmake-${CMAKE_VERSION}-linux-x86_64.sh
./cmake-${CMAKE_VERSION}-linux-x86_64.sh --skip-license --prefix=/usr/local
ln -sf /usr/local/bin/cmake /usr/bin/cmake
cmake --version

- name: Clone repo without submodules (1.8.3 version of Git)
run: |
git clone https://github.com/fluent/ctraces.git
shell: bash
- name: Check out the repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: recursive

- name: Check out the branch (1.8.3 version of Git)
env:
BRANCH_NAME: ${{ github.head_ref }}
run: |
git checkout "$BRANCH_NAME"
git submodule update --init --recursive
shell: bash
working-directory: ctraces
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0

- name: Run compilation
run: |
cmake -DCTR_TESTS=on -DCTR_DEV=on .
make
working-directory: ctraces
- name: Build sources on CentOS 7
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: .
file: ./dockerfiles/Dockerfile.centos7
push: false
load: false
provenance: false

build-debian:
name: Debian Bullseye build to confirm no issues once used downstream
name: Debian Bookworm build to confirm no issues once used downstream
runs-on: ubuntu-latest
container: debian:bullseye
container: debian:bookworm
steps:
- name: Set up base image dependencies
run: |
apt-get update
apt-get install -y build-essential wget make gcc g++ git libcurl4-openssl-dev

- name: Check out the repository
uses: actions/checkout@v7
with:
submodules: recursive

- name: Install CMake 3.20.0
run: |
CMAKE_VERSION=3.20.0
Expand All @@ -102,24 +87,12 @@ jobs:
# Confirm CMake installation
/usr/local/bin/cmake --version

- name: Clone repository and submodules
run: |
git clone --recursive https://github.com/fluent/ctraces.git
shell: bash

- name: Initialize submodules
run: |
git submodule update --init --recursive
shell: bash
working-directory: ctraces

- name: Run compilation
run: |
cmake -DCTR_TESTS=On -DCTR_DEV=On .
make all
CTEST_OUTPUT_ON_FAILURE=1 make test
cmake -S . -B build -DCTR_TESTS=On -DCTR_DEV=On
cmake --build build -j "$(getconf _NPROCESSORS_ONLN)"
ctest --test-dir build --output-on-failure
shell: bash
working-directory: ctraces

build-unix-arm64:
name: Build sources on arm64 for ${{ matrix.os }} - ${{ matrix.compiler }}
Expand Down Expand Up @@ -228,7 +201,7 @@ jobs:

- name: Configure and Build
run: |
/usr/local/bin/cmake -DCTR_TESTS=On -DCTR_DEV=On -DCMT_DEV=on .
/usr/local/bin/cmake -DCTR_TESTS=On -DCTR_DEV=On .
make all

# this job provides the single required status for PRs to be merged into main.
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,24 @@ on:

jobs:

shellcheck-pr:
shellcheck:
runs-on: ubuntu-latest
name: PR - Shellcheck
name: Shellcheck
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- uses: ludeeus/action-shellcheck@master

actionlint-pr:
actionlint:
runs-on: ubuntu-latest
name: PR - Actionlint
name: Actionlint
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- run: |
echo "::add-matcher::.github/actionlint-matcher.json"
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint -color -shellcheck=
shell: bash

docslint-pr:
runs-on: ubuntu-latest
name: PR - Markdownlint
steps:
- uses: actions/checkout@v7
- name: Run markdownlint
uses: actionshub/markdownlint@v3.1.4
8 changes: 4 additions & 4 deletions .github/workflows/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
runs-on: ubuntu-latest
name: build arm64 packages
strategy:
fail-fast: false
fail-fast: true
matrix:
format: [ rpm, deb ]
steps:
- uses: actions/checkout@v7
with:
submodules: true
submodules: true

- uses: uraimo/run-on-arch-action@v3.1.0
name: Build the ${{matrix.format}} packages
Expand Down Expand Up @@ -48,14 +48,14 @@ jobs:
build-distro-packages-amd64:
name: build amd64 packages
strategy:
fail-fast: false
fail-fast: true
matrix:
format: [ rpm, deb ]
runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v7
with:
submodules: true
submodules: true

- name: Build the ${{matrix.format}} packages
run: |
Expand Down
23 changes: 23 additions & 0 deletions dockerfiles/Dockerfile.centos7
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This image is used only to verify that ctraces builds on CentOS 7.
FROM centos:7

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 gcc gcc-c++ make wget libcurl-devel && \
yum clean all

ARG CMAKE_VERSION="3.20.0"

RUN wget -q "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh" \
-O /tmp/cmake-installer.sh && \
chmod +x /tmp/cmake-installer.sh && \
/tmp/cmake-installer.sh --skip-license --prefix=/usr/local && \
rm -f /tmp/cmake-installer.sh

COPY . /src/
WORKDIR /src/build

RUN cmake -DCTR_TESTS=On -DCTR_DEV=On .. && \
cmake --build . -j "$(getconf _NPROCESSORS_ONLN)" && \
ctest --output-on-failure
Loading