|
| 1 | +name: Windows |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - '*' |
| 6 | + pull_request: |
| 7 | + branches: |
| 8 | + - '*' |
| 9 | + |
| 10 | +# Notes: |
| 11 | +# Action ENV TEMP and TMP are short 8.3 paths, but the long path differs. |
| 12 | +# Code uses TMPDIR, which is Ruby's 'first' check |
| 13 | +# |
| 14 | +# Console encoding causes issues, see test-all & test-spec steps |
| 15 | +# |
| 16 | +jobs: |
| 17 | + mingw: |
| 18 | + runs-on: windows-2019 |
| 19 | + env: |
| 20 | + MSYSTEM: MINGW64 |
| 21 | + MSYSTEM_PREFIX: /mingw64 |
| 22 | + MSYS2_ARCH: x86_64 |
| 23 | + CHOST: "x86_64-w64-mingw32" |
| 24 | + CFLAGS: "-march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong" |
| 25 | + CXXFLAGS: "-march=x86-64 -mtune=generic -O3 -pipe" |
| 26 | + CPPFLAGS: "-D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048" |
| 27 | + LDFLAGS: "-pipe -fstack-protector-strong" |
| 28 | + UPDATE_UNICODE: "UNICODE_FILES=. UNICODE_PROPERTY_FILES=. UNICODE_AUXILIARY_FILES=. UNICODE_EMOJI_FILES=." |
| 29 | + strategy: |
| 30 | + fail-fast: false |
| 31 | + if: "!contains(github.event.head_commit.message, '[ci skip]')" |
| 32 | + steps: |
| 33 | + - name: git config |
| 34 | + run: | |
| 35 | + git config --system core.autocrlf false |
| 36 | + git config --system core.eol lf |
| 37 | + - name: Checkout repo |
| 38 | + uses: actions/checkout@v2 |
| 39 | + with: |
| 40 | + path: src |
| 41 | + - run: ./src/tool/actions-commit-info.sh |
| 42 | + shell: bash |
| 43 | + id: commit_info |
| 44 | + - name: Set up Ruby & MSYS2 |
| 45 | + uses: MSP-Greg/actions-ruby@master |
| 46 | + with: |
| 47 | + ruby-version: 2.6.x |
| 48 | + base: update |
| 49 | + mingw: gdbm gmp libffi libyaml openssl ragel readline |
| 50 | + msys2: automake1.16 bison |
| 51 | + - name: where check |
| 52 | + run: | |
| 53 | + # show where |
| 54 | + Write-Host |
| 55 | + $where = 'gcc.exe', 'ragel.exe', 'make.exe', 'bison.exe', 'libcrypto-1_1-x64.dll', 'libssl-1_1-x64.dll' |
| 56 | + foreach ($e in $where) { |
| 57 | + $rslt = where.exe $e 2>&1 | Out-String |
| 58 | + if ($rslt.contains($e)) { Write-Host $rslt } |
| 59 | + else { Write-Host "`nCan't find $e" } |
| 60 | + } |
| 61 | + - name: misc setup, autoreconf |
| 62 | + run: | |
| 63 | + mkdir build |
| 64 | + mkdir install |
| 65 | + mkdir temp |
| 66 | + cd src |
| 67 | + sh -c "autoreconf -fi" |
| 68 | +
|
| 69 | + - name: configure |
| 70 | + run: | |
| 71 | + # Actions uses UTF8, causes test failures, similar to normal OS setup |
| 72 | + $PSDefaultParameterValues['*:Encoding'] = 'utf8' |
| 73 | + [Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") |
| 74 | + [Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") |
| 75 | + cd build |
| 76 | + $config_args = "--build=$env:CHOST --host=$env:CHOST --target=$env:CHOST" |
| 77 | + Write-Host $config_args |
| 78 | + sh -c "../src/configure --disable-install-doc --prefix=/install $config_args" |
| 79 | + # Write-Host "-------------------------------------- config.log" |
| 80 | + # Get-Content ./config.log | foreach {Write-Output $_} |
| 81 | +
|
| 82 | + - name: download unicode, gems, etc |
| 83 | + run: | |
| 84 | + $jobs = [int]$env:NUMBER_OF_PROCESSORS + 1 |
| 85 | + cd build |
| 86 | + make -j $jobs update-unicode |
| 87 | + make -j $jobs update-gems |
| 88 | +
|
| 89 | + - name: make compile |
| 90 | + timeout-minutes: 20 |
| 91 | + run: | |
| 92 | + $jobs = [int]$env:NUMBER_OF_PROCESSORS + 1 |
| 93 | + make -C build -j $jobs V=1 |
| 94 | +
|
| 95 | + - name: make install |
| 96 | + run: | |
| 97 | + # Actions uses UTF8, causes test failures, similar to normal OS setup |
| 98 | + $PSDefaultParameterValues['*:Encoding'] = 'utf8' |
| 99 | + [Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") |
| 100 | + [Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") |
| 101 | + make -C build DESTDIR=.. install-nodoc |
| 102 | +
|
| 103 | + - name: test |
| 104 | + timeout-minutes: 5 |
| 105 | + run: | |
| 106 | + $env:TMPDIR = "$pwd/temp" |
| 107 | + make -C build test |
| 108 | +
|
| 109 | + - name: test-spec |
| 110 | + if: success() || failure() |
| 111 | + timeout-minutes: 10 |
| 112 | + run: | |
| 113 | + $env:TMPDIR = "$pwd/temp" |
| 114 | + $env:PATH = "$pwd/install/bin;$env:PATH" |
| 115 | + # Actions uses UTF8, causes test failures, similar to normal OS setup |
| 116 | + $PSDefaultParameterValues['*:Encoding'] = 'utf8' |
| 117 | + [Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") |
| 118 | + [Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") |
| 119 | + ruby -v |
| 120 | + cd src/spec/ruby |
| 121 | + ruby ../mspec/bin/mspec -j |
| 122 | +
|
| 123 | + - name: test-all |
| 124 | + if: success() || failure() |
| 125 | + timeout-minutes: 25 |
| 126 | + run: | |
| 127 | + $env:TMPDIR = "$pwd/temp" |
| 128 | + # Actions uses UTF8, causes test failures, similar to normal OS setup |
| 129 | + $PSDefaultParameterValues['*:Encoding'] = 'utf8' |
| 130 | + [Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") |
| 131 | + [Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") |
| 132 | + $jobs = [int]$env:NUMBER_OF_PROCESSORS |
| 133 | + make -C build test-all TESTOPTS="--retry --job-status=normal --show-skip --timeout-scale=1.5 --excludes=../src/test/excludes -n !/memory_leak/ -j $jobs" |
0 commit comments