]> granicus.if.org Git - fortune-mod/commitdiff
gh actions #2: cygwin64 fix
authorShlomi Fish <shlomif@shlomifish.org>
Sat, 11 Dec 2021 15:14:26 +0000 (17:14 +0200)
committerShlomi Fish <shlomif@shlomifish.org>
Sat, 11 Dec 2021 15:14:26 +0000 (17:14 +0200)
.github/workflows/windows-x64.yml
.github/workflows/windows-x86.yml [deleted file]
CI-testing/translate-travis.yml-to-github-actions.py

index 30e1a898d03afd1d1f91e8c408c1cd8d271256cc..de12079b090f0d5fdaaeafd2ab076fa2abfdbe1f 100644 (file)
@@ -20,6 +20,14 @@ jobs:
                 submodules: 'true'
         -   name: perl -V
             run: perl -V
+        -   run: git config --global core.autocrlf input
+        -   uses: cygwin/cygwin-install-action@master
+            with:
+                packages:
+                - docbook-xml
+                - docbook-xsl
+                - libxml2
+                - libxslt
         -   name: install cpanm and mult modules
             uses: perl-actions/install-with-cpanm@v1
             with:
@@ -91,11 +99,6 @@ jobs:
 
                 SET PERL_MM_OPT=INSTALL_BASE=C:/Perl5
 
-                C:\cygwin64\setup-x86_64.exe -qgnNdO -l C:\cygwin64\var\cache\setup
-                -R c:\cygwin64 -s http://cygwin.mirror.constant.com -P docbook-xml
-                -P docbook-xsl -P libxml2 -P libxslt || ( echo Failed & exit /B 1
-                )
-
                 set CMAKE_MAKE_PROGRAM=C:\strawberry\c\bin\gmake.exe
 
                 set CPATH=c:\mingw64\include;c:\msys64\mingw64\include
@@ -108,7 +111,7 @@ jobs:
 
                 SET FORTUNE_TEST_DEBUG=1
 
-                SET DOCMAKE_PATH_PREFIX="C:\cygwin64\bin;"
+                SET DOCMAKE_PATH_PREFIX="C:\cygwin\bin;"
 
                 perl CI-testing/continuous-integration-testing.pl --gen="MSYS Makefiles"
                 || ( echo Failed & exit /B 1 )
diff --git a/.github/workflows/windows-x86.yml b/.github/workflows/windows-x86.yml
deleted file mode 100644 (file)
index b06936e..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-# This file is GENERATED BY
-# CI-testing/translate-travis.yml-to-github-actions.py
-jobs:
-    perl:
-        runs-on: windows-latest
-        steps:
-        -   name: Setup perl
-            uses: shogo82148/actions-setup-perl@v1
-            with:
-                distribution: strawberry
-                perl-version: ${{ matrix.perl-version }}
-        -   name: Set git to use LF
-            run: 'git config --global core.autocrlf false
-
-                git config --global core.eol lf
-
-                '
-        -   uses: actions/checkout@v2
-            with:
-                submodules: 'true'
-        -   name: perl -V
-            run: perl -V
-        -   name: install cpanm and mult modules
-            uses: perl-actions/install-with-cpanm@v1
-            with:
-                install: 'App::Docmake
-
-                    Code::TidyAll::Plugin::ClangFormat
-
-                    Code::TidyAll::Plugin::Flake8
-
-                    Code::TidyAll::Plugin::TestCount
-
-                    Env::Path
-
-                    File::Find::Object
-
-                    IO::All
-
-                    List::Util
-
-                    Path::Tiny
-
-                    Perl::Critic
-
-                    Perl::Tidy
-
-                    Pod::Coverage::TrustPod
-
-                    String::ShellQuote
-
-                    Test::Code::TidyAll
-
-                    Test::Differences
-
-                    Test::EOL
-
-                    Test::Pod
-
-                    Test::Pod::Coverage
-
-                    Test::RunValgrind
-
-                    Test::TrailingSpace
-
-                    Test::Trap'
-        -   name: Set up MinGW
-            uses: egor-tensin/setup-mingw@v2
-            with:
-                platform: x86
-        -   name: install and test_script code
-            run: '@echo on
-
-                SET MSYSTEM=MINGW64
-
-                SET VERBOSE=1
-
-                SET CC=cc
-
-                SET CXX=c++
-
-                IF NOT EXIST C:\strawberry ( echo "strawberryperl is not installed.
-                Please fix appveyor.yml" exit 1 ) || ( echo Failed & exit /B 1 )
-
-                SET PATH=C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%
-
-                perl -v || ( echo Failed & exit /B 1 )
-
-                IF NOT EXIST C:\Perl5 mkdir C:\Perl5 || ( echo Failed & exit /B 1
-                )
-
-                SET PATH=C:\msys64\bin;C:\Perl5\bin;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%
-
-                SET PERL5LIB=C:/Perl5/lib/perl5
-
-                SET PERL_LOCAL_LIB_ROOT=C:/Perl5
-
-                SET PERL_MB_OPT=--install_base C:/Perl5
-
-                SET PERL_MM_OPT=INSTALL_BASE=C:/Perl5
-
-                C:\cygwin64\setup-x86_64.exe -qgnNdO -l C:\cygwin64\var\cache\setup
-                -R c:\cygwin64 -s http://cygwin.mirror.constant.com -P docbook-xml
-                -P docbook-xsl -P libxml2 -P libxslt || ( echo Failed & exit /B 1
-                )
-
-                set CMAKE_MAKE_PROGRAM=C:\strawberry\c\bin\gmake.exe
-
-                set CPATH=c:\mingw64\include;c:\msys64\mingw64\include
-
-                set LIBRARY_PATH=c:\mingw64\lib;c:\msys64\mingw64\lib
-
-                set PATH=%PATH%;c:\mingw64\lib;c:\mingw64\bin;c:\msys64\mingw64\lib;c:\msys64\mingw64\bin
-
-                SET PATH=%PATH%;C:\Python35-x64
-
-                SET FORTUNE_TEST_DEBUG=1
-
-                SET DOCMAKE_PATH_PREFIX="C:\cygwin64\bin;"
-
-                perl CI-testing/continuous-integration-testing.pl --gen="MSYS Makefiles"
-                || ( echo Failed & exit /B 1 )
-
-                '
-            shell: cmd
-        strategy:
-            fail-fast: true
-            matrix:
-                perl-version:
-                - '5.30'
-name: windows-x86
-'on':
-- push
index e5ecf0b7cdb9d987249f50913c3c4ac5da114580..05b233f7e04cc148810b726f7cfe1eb514971c3e 100644 (file)
@@ -137,6 +137,17 @@ def generate_windows_yaml(plat, output_path, is_act):
     while steps[-1]['name'] != 'perl -V':
         steps.pop()
 
+    step = {
+        "run": "git config --global core.autocrlf input",
+    }
+    steps.append(step)
+    step = {
+        "uses": "cygwin/cygwin-install-action@master",
+        "with": {
+            "packages": "docbook-xml docbook-xsl libxml2 libxslt".split(" "),
+        },
+    }
+    steps.append(step)
     cpanm_step = {
         "name": "install cpanm and mult modules",
         "uses": "perl-actions/install-with-cpanm@v1",
@@ -180,6 +191,9 @@ def generate_windows_yaml(plat, output_path, is_act):
             cmds.insert(idx, "SET CC=cc")
 
         for cmd in cmds:
+            if cmd.startswith("C:\\cygwin64\\setup"):
+                continue
+            cmd = cmd.replace("cygwin64", "cygwin")
             if cmd.startswith("cpanm "):
                 words = cmd.split(' ')[1:]
                 dw = []
@@ -249,11 +263,12 @@ def main():
         output_path=".act-github/workflows/use-github-actions.yml",
         is_act=True,
     )
-    generate_windows_yaml(
-        plat='x86',
-        output_path=".github/workflows/windows-x86.yml",
-        is_act=False,
-    )
+    if 0:
+        generate_windows_yaml(
+            plat='x86',
+            output_path=".github/workflows/windows-x86.yml",
+            is_act=False,
+        )
     generate_windows_yaml(
         plat='x64',
         output_path=".github/workflows/windows-x64.yml",