Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup CI job for Windows and MySQL 8.x #359

Open
dveeden opened this issue Aug 25, 2023 · 3 comments · May be fixed by #384
Open

Setup CI job for Windows and MySQL 8.x #359

dveeden opened this issue Aug 25, 2023 · 3 comments · May be fixed by #384
Assignees

Comments

@dveeden
Copy link
Collaborator

dveeden commented Aug 25, 2023

GitHub has windows runners, but it looks like MySQL requires a quite old Visual C++ version according to https://dev.mysql.com/doc/c-api/8.0/en/c-api-building-clients.html

@dveeden dveeden added the CI label Aug 25, 2023
@dveeden dveeden self-assigned this Aug 25, 2023
@dveeden
Copy link
Collaborator Author

dveeden commented Aug 25, 2023

I tried this, but that results in msvcrt issues...

  test-windows:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v3
      - name: Set up perl
        uses: shogo82148/actions-setup-perl@v1
        with:
          perl-version: 5.36
          install-modules-with: cpanm
          install-modules-args: --with-develop --with-suggests
          install-modules: Devel::CheckLib DBI::DBD
      - run: choco install mysql
      - name: Build
        run: |
          perl Makefile.PL --testhost=127.0.0.1 --testuser=root --cflags='-I"C:\tools\mysql\current\include"' --libs='-L"C:\tools\mysql\current\lib" -lmysqlclient'
          gmake
      - name: Test
        run: gmake test

@dveeden
Copy link
Collaborator Author

dveeden commented Aug 25, 2023

In the v4 branch there is appveyor.yml, but looks like appveyor doesn't support MySQL 8.0 ( see https://www.appveyor.com/docs/services-databases/#mysql )

version: 1.0.{build}

services:
  - mysql

install:
  - cinst StrawberryPerl
  - path C:\strawberry\perl\bin;C:\strawberry\perl\site\bin;C:\strawberry\c\bin;%PATH%
  - mkdir %APPVEYOR_BUILD_FOLDER%\tmp
  - set TMPDIR=%APPVEYOR_BUILD_FOLDER%\tmp
  - perl -V
  - cpan App::cpanminus
  - cpanm -q --showdeps --with-develop --with-suggests . | findstr /v "^perl\>" | cpanm -n
  - cpanm -q -n Devel::CheckLib

build_script:
  - perl Makefile.PL --mysql_config=c:\strawberry\c\bin\mysql_config.bat --testuser=root --testpassword=Password12!

test_script:
  - gmake test

@dveeden
Copy link
Collaborator Author

dveeden commented Nov 1, 2023

Related: appveyor/ci#3834

@dveeden dveeden linked a pull request Nov 1, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant