Fix conan #28
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 | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-linux: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: docker/setup-buildx-action@v4 | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| load: true | |
| tags: reo7sp/tgbot-cpp | |
| cache-from: type=gha,scope=runtime | |
| cache-to: type=gha,mode=max,scope=runtime | |
| - name: Build test Docker image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: Dockerfile_test | |
| load: true | |
| tags: reo7sp/tgbot-cpp-test | |
| cache-from: type=gha,scope=test | |
| cache-to: type=gha,mode=max,scope=test | |
| - name: Test tgbot-cpp | |
| run: make docker-test-only | |
| - name: Test codegen | |
| run: make docker-test-api-codegen | |
| test-windows: | |
| runs-on: windows-2022 | |
| timeout-minutes: 30 | |
| env: | |
| POETRY_VIRTUALENVS_IN_PROJECT: "true" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - id: python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Cache Python tools | |
| id: python-tools-cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: .ci-tools | |
| key: python-tools-windows-2022-${{ steps.python.outputs.python-version }}-clang-format-22.1.8-conan-2.31.1-poetry-2.4.1 | |
| - name: Cache Poetry environment | |
| uses: actions/cache@v5 | |
| with: | |
| path: .venv | |
| key: poetry-${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ hashFiles('poetry.lock', 'pyproject.toml') }} | |
| restore-keys: poetry-${{ runner.os }}-${{ steps.python.outputs.python-version }}- | |
| - name: Cache Conan packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.conan2/p | |
| key: conan-windows-2022-2.31.1-cpp20-${{ hashFiles('conanfile.py') }} | |
| restore-keys: conan-windows-2022-2.31.1-cpp20- | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Install Python tools | |
| if: steps.python-tools-cache.outputs.cache-hit != 'true' | |
| shell: pwsh | |
| run: | | |
| python -m venv .ci-tools | |
| .ci-tools/Scripts/python -m pip install "clang-format==22.1.8" "conan==2.31.1" "poetry==2.4.1" | |
| - name: Add Python tools to PATH | |
| shell: pwsh | |
| run: Resolve-Path .ci-tools/Scripts | Out-File -FilePath $env:GITHUB_PATH -Append | |
| - name: Build tgbot-cpp | |
| shell: bash | |
| run: | | |
| make build-with-test | |
| make install-only | |
| - name: Build examples | |
| shell: bash | |
| run: make examples | |
| - name: Test tgbot-cpp | |
| shell: bash | |
| run: make test-only | |
| - name: Test codegen | |
| shell: bash | |
| run: make test-api-codegen |