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
46 changes: 46 additions & 0 deletions .github/workflows/cmake.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Cmake build check x86_64

on:
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
gcc-version: [9, 10, 11, 12, 13]
cmake-options:
- ""
- "-DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTING=ON -DSEPARATE_DEBUG_SYMBOLS=ON"
fail-fast: false

container:
image: ubuntu:24.04

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
apt-get update
apt-get install -y \
g++-${{ matrix.gcc-version }} \
cmake \
make \
perl \
patch

- name: Set default GCC version
run: |
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc-version }} 100
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.gcc-version }} 100

- name: Create build dir
run: mkdir build
- name: cmake
run: cmake ${{ matrix.cmake-options }} ..
working-directory: build
- name: make
run: make -j2
working-directory: build
2 changes: 1 addition & 1 deletion src/fs/test/test_suite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ void Ossfs2TestSuite::remount() {
std::string Ossfs2TestSuite::exec(const char *cmd) {
std::array<char, 512> buffer;
std::string result;
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
std::unique_ptr<FILE, int (*)(FILE *)> pipe(popen(cmd, "r"), pclose);
if (!pipe) {
throw std::runtime_error("popen() failed!");
}
Expand Down