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'
|
2022-08-22 05:08:05 -04:00
|
|
|
- '**/.document'
|
2021-10-28 11:02:07 -04:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'doc/**'
|
|
|
|
- '**.md'
|
|
|
|
- '**.rdoc'
|
2022-08-22 05:08:05 -04:00
|
|
|
- '**/.document'
|
2019-12-31 02:19:31 -05:00
|
|
|
|
2021-11-18 08:21:05 -05:00
|
|
|
concurrency:
|
2021-11-21 05:17:27 -05:00
|
|
|
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
|
|
|
|
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
|
2021-11-18 08:21:05 -05:00
|
|
|
|
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:
|
2021-11-22 20:49:12 -05:00
|
|
|
runs-on: windows-2022
|
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
|
2022-07-01 05:15:36 -04:00
|
|
|
test_task: "check"
|
2022-07-04 22:35:14 -04:00
|
|
|
test-all-opts: "--name=!/TestObjSpace#test_reachable_objects_during_iteration/"
|
2021-06-23 04:17:52 -04:00
|
|
|
- msystem: "UCRT64"
|
|
|
|
base_ruby: head
|
2022-07-01 05:15:36 -04:00
|
|
|
test_task: "check"
|
2022-07-04 22:35:14 -04:00
|
|
|
test-all-opts: "--name=!/TestObjSpace#test_reachable_objects_during_iteration/"
|
2019-12-31 02:19:31 -05:00
|
|
|
fail-fast: false
|
2022-06-18 22:05:31 -04:00
|
|
|
if: ${{ !contains(github.event.head_commit.message, '[DOC]') && !contains(github.event.pull_request.labels.*.name, 'Documentation') }}
|
2019-12-31 02:19:31 -05:00
|
|
|
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
|
2022-03-24 07:38:59 -04:00
|
|
|
- uses: actions/checkout@v3
|
2020-05-11 05:37:08 -04:00
|
|
|
with:
|
|
|
|
path: src
|
2022-03-24 07:32:46 -04:00
|
|
|
- uses: actions/cache@v3
|
2021-12-02 08:21:20 -05:00
|
|
|
with:
|
|
|
|
path: src/.downloaded-cache
|
|
|
|
key: downloaded-cache
|
2019-12-31 02:19:31 -05:00
|
|
|
- name: Set up Ruby & MSYS2
|
2022-01-14 10:00:56 -05:00
|
|
|
uses: ruby/setup-ruby@v1
|
2019-12-31 02:19:31 -05:00
|
|
|
with:
|
2021-06-23 04:17:52 -04:00
|
|
|
ruby-version: ${{ matrix.base_ruby }}
|
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
|
2022-01-14 10:00:56 -05:00
|
|
|
mv /c/Windows/System32/libcrypto-1_1-x64.dll /c/Windows/System32/libcrypto-1_1-x64.dll_
|
|
|
|
mv /c/Windows/System32/libssl-1_1-x64.dll /c/Windows/System32/libssl-1_1-x64.dll_
|
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
|
|
|
|
2022-01-14 01:48:27 -05:00
|
|
|
- name: version check
|
|
|
|
run: |
|
|
|
|
# show version
|
|
|
|
result=true
|
|
|
|
for e in gcc ragel make bison "openssl version"; do
|
|
|
|
case "$e" in *" "*) ;; *) e="$e --version";; esac
|
|
|
|
echo '##['group']'$'\033[93m'$e$'\033[m'
|
|
|
|
$e || result=false
|
|
|
|
echo '##['endgroup']'
|
|
|
|
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
|
2022-07-01 05:15:36 -04:00
|
|
|
if: ${{matrix.test_task == 'check' || matrix.test_task == 'test'}}
|
2019-12-31 02:19:31 -05:00
|
|
|
|
2019-12-31 13:24:00 -05:00
|
|
|
- name: test-all
|
2021-11-22 20:49:12 -05:00
|
|
|
timeout-minutes: 45
|
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
|
2022-07-28 19:12:46 -04:00
|
|
|
make ${{ StartsWith(matrix.test_task, 'test/') && matrix.test_task || 'test-all' }}
|
2021-11-07 01:46:16 -05:00
|
|
|
env:
|
2022-07-03 23:21:30 -04:00
|
|
|
RUBY_TESTOPTS: >-
|
|
|
|
-j${{env.TEST_JOBS}} --retry --job-status=normal --show-skip --timeout-scale=1.5
|
|
|
|
${{ matrix.test-all-opts }}
|
2021-11-07 01:46:16 -05:00
|
|
|
BUNDLER_VERSION:
|
2022-07-01 05:15:36 -04:00
|
|
|
if: ${{matrix.test_task == 'check' || matrix.test_task == 'test-all' || StartsWith(matrix.test_task, 'test/')}}
|
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: |
|
2022-07-01 05:15:36 -04:00
|
|
|
make ${{ StartsWith(matrix.test_task, 'spec/') && matrix.test_task || 'test-spec' }}
|
|
|
|
if: ${{matrix.test_task == 'check' || matrix.test_task == 'test-spec' || StartsWith(matrix.test_task, '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",
|
2021-12-28 05:24:20 -05:00
|
|
|
"env": "${{ github.workflow }} ${{ matrix.msystem }} / ${{ matrix.test_task }}",
|
2020-03-07 03:34:41 -05:00
|
|
|
"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
|