diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..29e2a22 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,20 @@ +name: CI + +on: [push, pull_request] + +jobs: + build-and-test: + runs-on: ubuntu-latest + container: gitea.tap-tap.win/taptap/fastsync-ci:v4 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Configure + run: cmake -B build -S . + + - name: Build + run: cmake --build build -j$(nproc) + + - name: Unit Tests + run: ./build/tests diff --git a/CMakeLists.txt b/CMakeLists.txt index 6555105..2100f70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 4.1) +cmake_minimum_required(VERSION 3.22) project(FastFileTransfer) diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fe7faa4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM ubuntu:24.04 +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc g++ make libc6-dev cmake libzstd-dev git ca-certificates curl && \ + curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ + apt-get install -y --no-install-recommends nodejs && \ + rm -rf /var/lib/apt/lists/*