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
|
2021-11-07 03:03:40 -05:00
|
|
|
name: ${{ github.workflow }} (${{ matrix.msystem }})
|
2019-12-31 02:19:31 -05:00
|
|
|
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: |
|
2021-11-07 01:57:14 -05:00
|
|
|
echo "GNUMAKEFLAGS=-j$((2 * NUMBER_OF_PROCESSORS))" >> $GITHUB_ENV
|
|
|
|
echo "TEST_JOBS=$((15 * NUMBER_OF_PROCESSORS / 10))" >> $GITHUB_ENV
|
|
|
|
|
2019-12-31 02:19:31 -05:00
|
|
|
- name: where check
|
|
|
|
run: |
|
|
|
|
# show where
|
2021-11-07 01:57:14 -05:00
|
|
|
result=true
|
|
|
|
for e in gcc.exe ragel.exe make.exe bison.exe libcrypto-1_1-x64.dll libssl-1_1-x64.dll; do
|
2021-11-07 01:21:55 -04:00
|
|
|
echo '##['group']'$'\033[93m'$e$'\033[m'
|
2021-11-07 01:57:14 -05:00
|
|
|
where $e || result=false
|
2021-11-07 01:21:55 -04:00
|
|
|
echo '##['endgroup']'
|
2021-11-07 01:57:14 -05:00
|
|
|
done
|
|
|
|
$result
|
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
|
2019-12-31 02:19:31 -05:00
|
|
|
|
|
|
|
- name: configure
|
2021-11-07 01:57:14 -05:00
|
|
|
run: >
|
|
|
|
../src/configure --disable-install-doc --prefix=/.
|
|
|
|
--build=$CHOST --host=$CHOST --target=$CHOST
|
2019-12-31 02:19:31 -05:00
|
|
|
|
2020-06-15 22:44:31 -04:00
|
|
|
- name: update
|
|
|
|
run: |
|
2021-11-07 01:50:25 -05:00
|
|
|
make incs
|
2020-06-15 22:44:31 -04:00
|
|
|
|
|
|
|
- name: download gems
|
2019-12-31 02:19:31 -05:00
|
|
|
run: |
|
2021-11-07 01:50:25 -05:00
|
|
|
make 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-11-07 01:50:25 -05:00
|
|
|
make
|
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
|
2021-11-07 01:50:25 -05:00
|
|
|
make test-all
|
2021-11-07 01:46:16 -05:00
|
|
|
env:
|
2021-11-07 01:50:25 -05:00
|
|
|
RUBY_TESTOPTS: -j${{env.TEST_JOBS}} --retry --job-status=normal --show-skip --timeout-scale=1.5
|
2021-11-07 01:46:16 -05:00
|
|
|
BUNDLER_VERSION:
|
2019-12-31 02:19:31 -05:00
|
|
|
|
2019-12-31 13:24:00 -05:00
|
|
|
- name: test-spec
|
|
|
|
timeout-minutes: 10
|
2019-12-31 02:19:31 -05:00
|
|
|
run: |
|
2021-11-07 01:55:06 -05:00
|
|
|
make test-spec
|
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
|
2021-11-07 01:57:14 -05:00
|
|
|
shell: sh
|