test (#636) #1434
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: Ubuntu 22.04 (gcc) | |
on: | |
push: | |
branches: | |
- main | |
- master | |
- coro_http_server | |
pull_request: | |
branches: | |
- main | |
- master | |
- coro_http_server | |
jobs: | |
build_by_gcc: | |
strategy: | |
matrix: | |
mode: [Debug, Release] | |
ssl: [ON, OFF] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get install openssl | |
sudo apt-get install libssl-dev | |
- name: Configure CMake | |
run: CXX=g++ CC=gcc cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.mode}} -DCINATRA_ENABLE_SSL=${{matrix.ssl}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{matrix.mode}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{matrix.mode}} -j `nproc` -V | |
ubuntu_gcc_for_liburing: | |
strategy: | |
matrix: | |
mode: [Release, Debug] | |
io_uring: [ ON ] | |
case_name: [ test_corofile ] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install liburing | |
run: | | |
wget https://github.com/axboe/liburing/archive/refs/tags/liburing-2.3.tar.gz | |
tar -zxvf liburing-2.3.tar.gz | |
cd liburing-liburing-2.3/ | |
./configure --cc=gcc --cxx=g++ | |
make | |
sudo make install | |
- name: Install ninja-build tool | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ${{ github.job }}-${{ matrix.mode}}-ssl( ${{ matrix.ssl}} ) | |
- name: Configure | |
run: | | |
CXX=g++ CC=gcc | |
cmake -B ${{github.workspace}}/build -G Ninja \ | |
-DCMAKE_BUILD_TYPE=${{matrix.mode}} \ | |
-DENABLE_FILE_IO_URING=${{matrix.io_uring}} \ | |
-DUSE_CCACHE=${{env.ccache}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{matrix.mode}} --target ${{matrix.case_name}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{matrix.mode}} -R ${{matrix.case_name}} -j 1 `nproc` -V |