Compare commits

...

2 commits

Author SHA1 Message Date
6d3b5e764a Update github workflow to use conan
All checks were successful
Run UnitTests / build-and-run-tests (push) Successful in 1m23s
2024-07-12 17:08:57 +09:00
6ea0aa71fc Update forgejo workflow to use conan 2024-07-12 17:08:52 +09:00
2 changed files with 25 additions and 7 deletions

View file

@ -6,9 +6,23 @@ on:
jobs: jobs:
build-and-run-tests: build-and-run-tests:
runs-on: any_archLinux runs-on: docker_arch
steps: 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 - 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 && git checkout $GITHUB_REF_NAME
- run: cd UDPC && cmake -S . -B buildDebug -DCMAKE_BUILD_TYPE=Debug name: Checkout git repository
- run: make -C UDPC/buildDebug && ./UDPC/buildDebug/UnitTest - 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

View file

@ -9,10 +9,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Install dependencies - name: Install dependencies
run: sudo /usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get install cmake git libsodium-dev run: sudo /usr/bin/env DEBIAN_FRONTEND=noninteractive apt-get install cmake git libsodium-dev python
- name: Get sources - name: Get sources
run: git clone --depth=1 --no-single-branch https://github.com/Stephen-Seo/UDPConnection.git UDPC && cd UDPC && git checkout $GITHUB_REF_NAME run: git clone --depth=1 --no-single-branch https://github.com/Stephen-Seo/UDPConnection.git UDPC && cd UDPC && git checkout $GITHUB_REF_NAME
- name: Build sources - name: Get Conan
run: cd UDPC && cmake -S . -B buildDebug -DCMAKE_BUILD_TYPE=Debug && make -C buildDebug run: python -m venv venv_conan && source venv_conan/bin/activate && pip install conan
- name: Set up conan
run: source venv_conan/bin/activate && conan profile detect --force
- name: Build with conan
run: source venv_conan/bin/activate && conan build UDPC -of buildConan --settings=build_type=Debug --build=missing
- name: Run tests - name: Run tests
run: ./UDPC/buildDebug/UnitTest run: find buildConan -name UnitTest -execdir './{}' ';'