]> git.seodisparate.com - UDPConnection/commitdiff
Update forgejo workflow to use conan
authorStephen Seo <seo.disparate@gmail.com>
Fri, 12 Jul 2024 07:46:31 +0000 (16:46 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Sat, 13 Jul 2024 02:43:01 +0000 (11:43 +0900)
.forgejo/workflows/unittests.yml

index a4e904100897665ed8ce3b84ec0c252a8f39f10b..64fd4e24b7d1befb19dbbacec6d2b0eb90afb95b 100644 (file)
@@ -6,9 +6,23 @@ on:
 
 jobs:
   build-and-run-tests:
-    runs-on: any_archLinux
+    runs-on: docker_arch
     steps:
+      - run: pacman-key --init && pacman-key --populate
+        name: Init pacman keyring
+      - run: pacman --noconfirm --needed -Sy archlinux-keyring
+        name: Update pacman keyring
+      - run: pacman --noconfirm --needed -Su git cmake libsodium python
+        name: Update and get dependencies
+      - run: python -m venv conan_venv && source conan_venv/bin/activate && pip install conan
+        name: Get conan
+      - run: source conan_venv/bin/activate && conan profile detect --force
+        name: Set up conan profile
       - run: git clone --depth=1 --no-single-branch https://git.seodisparate.com/stephenseo/UDPConnection.git UDPC
+        name: Get repository
       - run: cd UDPC && git checkout $GITHUB_REF_NAME
-      - run: cd UDPC && cmake -S . -B buildDebug -DCMAKE_BUILD_TYPE=Debug
-      - run: make -C UDPC/buildDebug && ./UDPC/buildDebug/UnitTest
+        name: Checkout git repository
+      - run: source conan_venv/bin/activate && conan build UDPC -of buildConan --settings=build_type=Debug --build=missing
+        name: Build with conan
+      - run: find buildConan -name UnitTest -execdir './{}' ';'
+        name: Test