From 94180e2a053b63dedcb0a3d834e60e1ddebe9af8 Mon Sep 17 00:00:00 2001 From: SergeySeroshtan Date: Sat, 27 Apr 2024 10:11:24 -0400 Subject: [PATCH] Try windows build --- .github/workflows/build-macos-php.yml | 5 ++- .github/workflows/build-windows-php.yml | 55 +++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-windows-php.yml diff --git a/.github/workflows/build-macos-php.yml b/.github/workflows/build-macos-php.yml index 9e8d29703..4be04cfe0 100644 --- a/.github/workflows/build-macos-php.yml +++ b/.github/workflows/build-macos-php.yml @@ -2,7 +2,10 @@ name: build-php-macos on: push: branches: - - "**" + - "main" + - "develop" + - "release/**" + - "hotfix/**" tags: - "*" jobs: diff --git a/.github/workflows/build-windows-php.yml b/.github/workflows/build-windows-php.yml new file mode 100644 index 000000000..2161a84a6 --- /dev/null +++ b/.github/workflows/build-windows-php.yml @@ -0,0 +1,55 @@ +name: build-php-linux +on: + push: + branches: + - "**" + tags: + - "*" +jobs: + build-php: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-latest] + php-version: ["8.3"] + arch: ["x86_64"] + name: PHP ${{ matrix.php-version }} build on ${{ matrix.os }} for arch ${{ matrix.arch }} + steps: + - name: Install PHP ${{ matrix.php-version }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + - name: Check PHP Version + run: php -v + - uses: actions/checkout@v4 + - name: Configure toolchain + run: | + cmake --version + python3 --version + pip3 install protobuf grpcio-tools + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} + - name: Configure project + run: > + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DVIRGIL_PACKAGE_PLATFORM_ARCH=${{ matrix.arch }} \ + -DVIRGIL_PACKAGE_LANGUAGE_VERSION=${{ matrix.php-version }} \ + -DCPACK_OUTPUT_FILE_PREFIX=php \ + -DENABLE_CLANGFORMAT=OFF \ + -DED25519_REF10=OFF -DED25519_AMD64_RADIX_64_24K=ON \ + -Bbuild -S. + - name: Build project + run: cmake --build build -- -j$(nproc) + - name: Test project + working-directory: build + run: ctest --verbose + - name: Package project + working-directory: build + run: cpack + - name: Attach artifacts to the release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: build/php/*.tar.gz