ulib/.gitea/workflows/linux-x64-gcc.yml
tqcq 17b216911d
Some checks failed
linux-mips64-gcc / linux-gcc-mips64el (push) Failing after 48s
linux-x64-gcc / linux-gcc (push) Failing after 1m22s
fix add -y for apt-get
2023-12-13 13:04:36 +08:00

56 lines
1.3 KiB
YAML

name: linux-x64-gcc
on:
push:
paths:
- ".gitea/workflows/linux-x64-gcc.yml"
- "src/**"
- "tests/**"
- "CMakeLists.txt"
- "cmake/**"
pull_request:
paths:
- ".gitea/workflows/linux-x64-gcc.yml"
- "src/**"
- "tests/**"
- "CMakeLists.txt"
- "cmake/**"
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
run: |
sudo apt-get update -y
sudo apt-get install -y cmake make
- name: configure
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DULIB_BUILD_TESTS=ON
- name: build
run: |
cmake --build build -j `nproc`
- name: test
run: |
cd build && ctest --output-on-failure -j `nproc`
- name: configure-shared
run: |
mkdir build-shared && cd build-shared
cmake .. -DCMAKE_BUILD_TYPE=Release -DULIB_BUILD_TESTS=ON -DULIB_SHARED_LIB=ON
- name: build-shared
run: |
cmake --build build-shared -j `nproc`
- name: test-shared
run: |
cd build-shared && ctest --output-on-failure -j `nproc`