From 53e5e06c5f661c9f54b55a735144499a2be53ca9 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Thu, 24 Mar 2022 22:14:28 +0900 Subject: [PATCH 1/3] pin the version of windows --- .github/workflows/release.yml | 2 +- .github/workflows/test-cygwin.yml | 2 +- .github/workflows/test-mingw.yml | 2 +- .github/workflows/test-windows.yml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5125ac..6bb77fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,7 +56,7 @@ jobs: windows: name: windows - runs-on: windows-latest + runs-on: windows-2019 needs: build strategy: fail-fast: false diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml index afcfa06..5acb344 100644 --- a/.github/workflows/test-cygwin.yml +++ b/.github/workflows/test-cygwin.yml @@ -15,7 +15,7 @@ on: jobs: test: name: Test - runs-on: windows-latest + runs-on: windows-2019 steps: - run: git config --global core.autoCRLF false - uses: actions/checkout@v3 diff --git a/.github/workflows/test-mingw.yml b/.github/workflows/test-mingw.yml index 56ee6bb..8635acd 100644 --- a/.github/workflows/test-mingw.yml +++ b/.github/workflows/test-mingw.yml @@ -15,7 +15,7 @@ on: jobs: test: name: Test - runs-on: windows-latest + runs-on: windows-2019 steps: - uses: actions/checkout@v3 - uses: msys2/setup-msys2@v2 diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 59254a3..30cbc23 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -13,9 +13,9 @@ on: - "mecab/**" jobs: - test: + test-windows-2019: name: Test - runs-on: windows-latest + runs-on: windows-2019 strategy: fail-fast: false matrix: From 82599258effa95ba89b4bb16ac682b21a1de13bf Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Thu, 24 Mar 2022 22:16:52 +0900 Subject: [PATCH 2/3] run tests on windows 2022 --- .github/workflows/test-windows.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 30cbc23..d4783d6 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -44,3 +44,35 @@ jobs: ./run-eval.sh ./run-cost-train.sh working-directory: mecab/tests + + test-windows-2022: + name: Test + runs-on: windows-2022 + strategy: + fail-fast: false + matrix: + machine: + - x64 + - x86 + steps: + - uses: actions/checkout@v3 + - name: generate Makefile.msvc + shell: bash + # Makefile.msvc will be generated by autotools, but it is hard to install autotools to windows + # so, just use perl here + run: | + perl -pe 's/[@]VERSION[@]/develop/g; s/[@]DIC_VERSION[@]/0/g;' Makefile.msvc.in > Makefile.msvc + working-directory: mecab/src + - name: build + shell: cmd + run: | + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.machine }} + nmake -f Makefile.msvc MACHINE=${{ matrix.machine }} + working-directory: mecab/src + - name: test + shell: bash + run: | + ./run-dics.sh + ./run-eval.sh + ./run-cost-train.sh + working-directory: mecab/tests From 85717d0b35ec0f7664910cc7e5c4ed8483185c41 Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Thu, 24 Mar 2022 22:33:24 +0900 Subject: [PATCH 3/3] fix job name --- .github/workflows/test-windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index d4783d6..a3fdb6f 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -14,7 +14,7 @@ on: jobs: test-windows-2019: - name: Test + name: Test on Windows 2019 runs-on: windows-2019 strategy: fail-fast: false @@ -46,7 +46,7 @@ jobs: working-directory: mecab/tests test-windows-2022: - name: Test + name: Test on Windows 2022 runs-on: windows-2022 strategy: fail-fast: false