ulib/.gitea/workflows/linux-x64-gcc.yml

55 lines
1.3 KiB
YAML
Raw Normal View History

2023-12-05 16:14:04 +08:00
name: linux-x64-gcc
on:
2023-12-05 16:39:01 +08:00
push:
paths:
- ".gitea/workflows/linux-x64-gcc.yml"
- "src/**"
- "tests/**"
- "CMakeLists.txt"
- "cmake/**"
2023-12-05 16:39:01 +08:00
pull_request:
paths:
- ".gitea/workflows/linux-x64-gcc.yml"
- "src/**"
- "tests/**"
- "CMakeLists.txt"
- "cmake/**"
2023-12-05 16:14:04 +08:00
concurrency:
group: linux-x64-gcc-${{ github.ref }}
cancel-in-progress: true
permissions:
- read
jobs:
linux-gcc:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: update
2023-12-05 16:30:25 +08:00
run: sudo apt-get update
2023-12-05 16:14:04 +08:00
- name: configure
2023-12-05 16:30:25 +08:00
run: |
2023-12-05 16:14:04 +08:00
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DULIB_BUILD_TESTS=ON
- name: build
2023-12-05 16:30:25 +08:00
run: |
2023-12-05 16:14:04 +08:00
cmake --build build -j `nproc`
- name: test
2023-12-05 16:30:25 +08:00
run: |
2023-12-05 16:14:04 +08:00
cd build && ctest --output-on-failure -j `nproc`
- name: configure-shared
2023-12-05 16:30:25 +08:00
run: |
2023-12-05 16:14:04 +08:00
mkdir build-shared && cd build-shared
2023-12-05 16:18:06 +08:00
cmake .. -DCMAKE_BUILD_TYPE=Release -DULIB_BUILD_TESTS=ON -DULIB_SHARED_LIB=ON
2023-12-05 16:14:04 +08:00
- name: build-shared
2023-12-05 16:30:25 +08:00
run: |
2023-12-05 16:14:04 +08:00
cmake --build build-shared -j `nproc`
- name: test-shared
2023-12-05 16:30:25 +08:00
run: |
cd build-shared && ctest --output-on-failure -j `nproc`