added uncrustify format config #40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test CI | |
| on: | |
| push: | |
| branches: ["main", "master"] | |
| pull_request: | |
| branches: ["main", "master"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| # | |
| #linux | |
| # | |
| linux-prepare: | |
| name: Prepare Linux Container | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/build-linux-container | |
| linux-test: | |
| name: Linux Test (${{ matrix.compiler }}-release) | |
| needs: linux-prepare | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [clang, gcc] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Linux Env | |
| uses: ./.github/actions/setup-linux | |
| - name: Cache vcpkg installed | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| out/build/ci-linux-${{ matrix.compiler }}-release/vcpkg_installed | |
| key: vcpkg-installed-linux-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: | | |
| vcpkg-installed-linux-${{ matrix.compiler }}- | |
| - name: Configure | |
| uses: ./.github/actions/run-linux | |
| with: | |
| run: | | |
| cp ci/cmake/CMakeUserPresets.json . | |
| cmake --preset ci-linux-${{ matrix.compiler }}-release | |
| - name: Build | |
| uses: ./.github/actions/run-linux | |
| with: | |
| run: cmake --build --preset ci-linux-${{ matrix.compiler }}-release --target cth_coro cth_cthm cth_tests cth_coro_tests | |
| - name: Test | |
| uses: ./.github/actions/run-linux | |
| with: | |
| run: ctest --preset ci-linux-${{ matrix.compiler }}-release --output-on-failure --tests-regex "cth_tests|cth_coro_tests" | |
| - name: Fix permissions | |
| if: always() | |
| run: sudo chown -R $(id -u):$(id -g) out/build | |
| # | |
| #windows | |
| # | |
| windows-test: | |
| name: Windows Test (${{ matrix.compiler }}) | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [msvc, clang] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| cache: "pip" | |
| cache-dependency-path: ".github/requirements.txt" | |
| - name: Install CMake & Ninja | |
| shell: pwsh | |
| run: | | |
| pip install --upgrade -r .github/requirements.txt | |
| - name: Setup Windows Env | |
| uses: ./.github/actions/setup-windows | |
| with: | |
| compiler: ${{ matrix.compiler }} | |
| # - name: Create vcpkg-archives | |
| # shell: pwsh | |
| # run: New-Item -ItemType Directory -Force -Path vcpkg-archives | |
| - name: Configure | |
| shell: pwsh | |
| run: | | |
| Copy-Item ci/cmake/CMakeUserPresets.json . | |
| cmake --preset ci-windows-${{ matrix.compiler }} | |
| - name: Build | |
| shell: pwsh | |
| run: | | |
| cmake --build --preset ci-windows-${{ matrix.compiler }} --target cth_coro cth_cthm cth_tests integration_tests cth_coro_tests cth_win cth_win_tests | |
| - name: Test | |
| shell: pwsh | |
| run: | | |
| ctest --preset ci-windows-${{ matrix.compiler }} --output-on-failure --tests-regex "cth_tests|integration_tests|cth_coro_tests|cth_win_tests" |