2019-12-31 02:30:34 -05:00
|
|
|
name: MinGW
|
2021-10-28 11:02:07 -04:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- 'doc/**'
|
|
|
|
- '**.md'
|
|
|
|
- '**.rdoc'
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'doc/**'
|
|
|
|
- '**.md'
|
|
|
|
- '**.rdoc'
|
2019-12-31 02:19:31 -05:00
|
|
|
|
|
|
|
# Notes:
|
2020-04-18 20:35:19 -04:00
|
|
|
# Actions console encoding causes issues, see test-all & test-spec steps
|
2019-12-31 02:19:31 -05:00
|
|
|
#
|
|
|
|
jobs:
|
2019-12-31 02:30:34 -05:00
|
|
|
make:
|
2019-12-31 02:19:31 -05:00
|
|
|
runs-on: windows-2019
|
|
|
|
env:
|
2021-06-23 04:17:52 -04:00
|
|
|
MSYSTEM: ${{ matrix.msystem }}
|
2019-12-31 02:19:31 -05:00
|
|
|
MSYS2_ARCH: x86_64
|
|
|
|
CHOST: "x86_64-w64-mingw32"
|
|
|
|
CFLAGS: "-march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong"
|
|
|
|
CXXFLAGS: "-march=x86-64 -mtune=generic -O3 -pipe"
|
|
|
|
CPPFLAGS: "-D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048"
|
|
|
|
LDFLAGS: "-pipe -fstack-protector-strong"
|
|
|
|
UPDATE_UNICODE: "UNICODE_FILES=. UNICODE_PROPERTY_FILES=. UNICODE_AUXILIARY_FILES=. UNICODE_EMOJI_FILES=."
|
2020-06-03 21:26:40 -04:00
|
|
|
GITPULLOPTIONS: --no-tags origin ${{github.ref}}
|
2019-12-31 02:19:31 -05:00
|
|
|
strategy:
|
2019-12-31 02:30:34 -05:00
|
|
|
matrix:
|
2021-06-23 04:17:52 -04:00
|
|
|
include:
|
|
|
|
- msystem: "MINGW64"
|
|
|
|
base_ruby: 2.6
|
|
|
|
test_task: [ "check" ] # to make job names consistent
|
|
|
|
- msystem: "UCRT64"
|
|
|
|
base_ruby: head
|
|
|
|
test_task: [ "check" ] # to make job names consistent
|
2019-12-31 02:19:31 -05:00
|
|
|
fail-fast: false
|
|
|
|
steps:
|
2020-10-19 02:32:39 -04:00
|
|
|
- run: mkdir build
|
|
|
|
working-directory:
|
2019-12-31 02:19:31 -05:00
|
|
|
- name: git config
|
|
|
|
run: |
|
2021-02-02 00:37:15 -05:00
|
|
|
git config --global core.autocrlf false
|
|
|
|
git config --global core.eol lf
|
|
|
|
git config --global advice.detachedHead 0
|
2021-03-07 22:42:48 -05:00
|
|
|
git config --global init.defaultBranch garbage
|
2020-05-11 05:37:08 -04:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
path: src
|
2019-12-31 02:19:31 -05:00
|
|
|
- name: Set up Ruby & MSYS2
|
2021-06-23 04:17:52 -04:00
|
|
|
uses: MSP-Greg/setup-ruby-pkgs@ucrt
|
2019-12-31 02:19:31 -05:00
|
|
|
with:
|
2021-06-23 04:17:52 -04:00
|
|
|
ruby-version: ${{ matrix.base_ruby }}
|
|
|
|
setup-ruby-ref: MSP-Greg/ruby-setup-ruby/00-win-ucrt
|
|
|
|
mingw: _upgrade_ gmp libffi libyaml openssl ragel readline gcc
|
2019-12-31 02:19:31 -05:00
|
|
|
msys2: automake1.16 bison
|
2021-02-07 10:02:20 -05:00
|
|
|
- name: set env
|
|
|
|
run: |
|
|
|
|
$build_jobs = [int](2 * $env:NUMBER_OF_PROCESSORS)
|
|
|
|
$test_jobs = [int](1.5 * $env:NUMBER_OF_PROCESSORS)
|
|
|
|
Write-Output "BUILD_JOBS=$build_jobs" >> $env:GITHUB_ENV
|
|
|
|
Write-Output "TEST_JOBS=$test_jobs" >> $env:GITHUB_ENV
|
2019-12-31 02:19:31 -05:00
|
|
|
- name: where check
|
|
|
|
run: |
|
|
|
|
# show where
|
|
|
|
Write-Host
|
|
|
|
$where = 'gcc.exe', 'ragel.exe', 'make.exe', 'bison.exe', 'libcrypto-1_1-x64.dll', 'libssl-1_1-x64.dll'
|
|
|
|
foreach ($e in $where) {
|
|
|
|
$rslt = where.exe $e 2>&1 | Out-String
|
|
|
|
if ($rslt.contains($e)) { Write-Host $rslt }
|
|
|
|
else { Write-Host "`nCan't find $e" }
|
|
|
|
}
|
2021-11-07 01:34:29 -05:00
|
|
|
|
|
|
|
- name: autogen
|
2019-12-31 02:19:31 -05:00
|
|
|
run: |
|
2021-11-07 01:34:29 -05:00
|
|
|
./autogen.sh
|
|
|
|
working-directory: src
|
|
|
|
shell: sh
|
2019-12-31 02:19:31 -05:00
|
|
|
|
|
|
|
- name: configure
|
|
|
|
run: |
|
|
|
|
$config_args = "--build=$env:CHOST --host=$env:CHOST --target=$env:CHOST"
|
|
|
|
Write-Host $config_args
|
2021-11-07 01:31:34 -05:00
|
|
|
sh -c "../src/configure --disable-install-doc --prefix=/. $config_args"
|
2019-12-31 02:19:31 -05:00
|
|
|
# Write-Host "-------------------------------------- config.log"
|
|
|
|
# Get-Content ./config.log | foreach {Write-Output $_}
|
|
|
|
|
2020-06-15 22:44:31 -04:00
|
|
|
- name: update
|
|
|
|
run: |
|
2021-02-07 10:02:20 -05:00
|
|
|
make -j $env:BUILD_JOBS incs
|
2020-06-15 22:44:31 -04:00
|
|
|
|
|
|
|
- name: download gems
|
2019-12-31 02:19:31 -05:00
|
|
|
run: |
|
2021-02-07 10:02:20 -05:00
|
|
|
make -j $env:BUILD_JOBS update-gems
|
2019-12-31 02:19:31 -05:00
|
|
|
|
2019-12-31 02:42:20 -05:00
|
|
|
- name: make all
|
2021-10-03 22:58:32 -04:00
|
|
|
timeout-minutes: 20
|
2019-12-31 02:19:31 -05:00
|
|
|
run: |
|
2021-02-07 10:02:20 -05:00
|
|
|
make -j $env:BUILD_JOBS
|
2019-12-31 02:19:31 -05:00
|
|
|
|
2020-12-25 09:44:01 -05:00
|
|
|
- run: make leaked-globals
|
|
|
|
|
2019-12-31 02:19:31 -05:00
|
|
|
- name: make install
|
|
|
|
run: |
|
2021-11-07 01:31:34 -05:00
|
|
|
make DESTDIR=../install install-nodoc
|
2019-12-31 02:19:31 -05:00
|
|
|
|
|
|
|
- name: test
|
|
|
|
timeout-minutes: 5
|
|
|
|
run: |
|
2020-02-25 23:12:46 -05:00
|
|
|
make test
|
2019-12-31 02:19:31 -05:00
|
|
|
|
2019-12-31 13:24:00 -05:00
|
|
|
- name: test-all
|
2021-10-28 21:31:03 -04:00
|
|
|
timeout-minutes: 40
|
2019-12-31 02:19:31 -05:00
|
|
|
run: |
|
|
|
|
# Actions uses UTF8, causes test failures, similar to normal OS setup
|
2021-11-07 01:43:11 -05:00
|
|
|
chcp.com 437
|
2020-12-07 17:47:42 -05:00
|
|
|
if ($env:BUNDLER_VERSION) { Remove-Item env:\BUNDLER_VERSION }
|
2021-02-07 10:02:20 -05:00
|
|
|
make test-all TESTOPTS="-j $env:TEST_JOBS --retry --job-status=normal --show-skip --timeout-scale=1.5"
|
2019-12-31 02:19:31 -05:00
|
|
|
|
2019-12-31 13:24:00 -05:00
|
|
|
- name: test-spec
|
|
|
|
timeout-minutes: 10
|
2020-02-25 23:12:46 -05:00
|
|
|
working-directory: src/spec/ruby
|
2019-12-31 02:19:31 -05:00
|
|
|
run: |
|
2020-04-18 20:35:19 -04:00
|
|
|
$env:Path = "$pwd/../../../install/bin;$env:Path"
|
2019-12-31 13:24:00 -05:00
|
|
|
ruby -v
|
2021-02-27 11:42:00 -05:00
|
|
|
ruby ../mspec/bin/mspec -I../../tool/lib -j --timeout 60
|
2019-12-31 02:46:17 -05:00
|
|
|
|
2020-03-07 03:34:41 -05:00
|
|
|
- uses: k0kubun/action-slack@v2.0.0
|
|
|
|
with:
|
|
|
|
payload: |
|
|
|
|
{
|
|
|
|
"ci": "GitHub Actions",
|
|
|
|
"env": "${{ github.workflow }} / ${{ matrix.test_task }}",
|
|
|
|
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
|
2020-03-10 01:31:50 -04:00
|
|
|
"commit": "${{ github.sha }}",
|
|
|
|
"branch": "${{ github.ref }}".split('/').reverse()[0]
|
2020-03-07 03:34:41 -05:00
|
|
|
}
|
|
|
|
env:
|
2020-03-10 01:31:50 -04:00
|
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
|
2021-08-01 22:39:38 -04:00
|
|
|
if: ${{ failure() && github.event_name == 'push' }}
|
2020-10-19 02:32:39 -04:00
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: build
|