Skip to content
Merged
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
98 changes: 77 additions & 21 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,48 @@ jobs:
name: CentOS 7 build to confirm no issues once used downstream
runs-on: ubuntu-latest
container: centos:7
permissions:
contents: none
env:
# workaround required for checkout@v3, https://github.com/actions/checkout/issues/1590
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
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 -y update
yum install -y ca-certificates gcc gcc-c++ git make wget
yum install -y epel-release
yum install -y cmake3
yum install -y libcurl-devel

shell: bash

- name: Clone repo with submodules (1.8.3 version of Git)
- 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 --recursive https://github.com/calyptia/ctraces.git
git clone https://github.com/fluent/ctraces.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"
git submodule update --init --recursive
shell: bash
working-directory: ctraces

- name: Run compilation
run: |
cmake3 -DCTR_TESTS=on -DCTR_DEV=on .
cmake -DCTR_TESTS=on -DCTR_DEV=on .
make
shell: bash
working-directory: ctraces

build-debian:
Expand All @@ -75,19 +86,40 @@ jobs:
- name: Set up base image dependencies
run: |
apt-get update
apt-get install -y build-essential cmake make git
apt-get install -y build-essential wget make gcc g++ git libcurl4-openssl-dev

- 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

# Ensure the new CMake is found first
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bashrc
export PATH="/usr/local/bin:$PATH"

# 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

- uses: actions/checkout@v4
with:
submodules: true
- name: Initialize submodules
run: |
git submodule update --init --recursive
shell: bash
working-directory: ctraces

- name: Run compilation
run: |
cmake -DCTR_TESTS=On .
cmake -DCTR_TESTS=On -DCTR_DEV=On .
make all
CTEST_OUTPUT_ON_FAILURE=1 make test
shell: bash
working-directory: ctraces

build-unix-arm64:
name: Build sources on arm64 for ${{ matrix.os }} - ${{ matrix.compiler }}
Expand Down Expand Up @@ -164,16 +196,40 @@ jobs:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check out the repository
uses: actions/checkout@v4
with:
submodules: true

- uses: docker://lpenz/ghaction-cmake:0.19
with:
preset: ${{ matrix.preset }}
# dependencies_debian: ''
cmakeflags: '-DCTR_TESTS=On -DCMT_DEV=on .'
build_command: make all
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
clang \
valgrind \
wget \
make \
gcc \
g++ \
git \
libcurl4-openssl-dev

- name: Install CMake 3.20.0 or higher
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
sudo ./cmake-${CMAKE_VERSION}-linux-x86_64.sh --skip-license --prefix=/usr/local
sudo ln -sf /usr/local/bin/cmake /usr/bin/cmake
/usr/local/bin/cmake --version

- name: Initialize Submodules
run: git submodule update --init --recursive

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

# this job provides the single required status for PRs to be merged into main.
# instead of updating the protected branch status in github, developers can update the needs section below
Expand Down