Skip to content

mingw

mingw #4469

Workflow file for this run

name: mingw
on:
push:
branches:
- '*'
schedule:
- cron: '45 1,8,15 * * *'
workflow_dispatch:
jobs:
mingw:
strategy:
fail-fast: false
runs-on: windows-2022
env:
PRE: ruby-mingw
RUST_TC: stable-x86_64-pc-windows-gnu
steps:
- name: git config
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- name: Checkout ruby-loco
uses: actions/checkout@v4
- name: get ruby and rubyinstaller2
timeout-minutes: 5
run: |
$gh = 'https://github.com'
git clone -q --depth=1 --no-tags --branch=master $gh/oneclick/rubyinstaller2.git ./rubyinstaller2
git clone -q --depth=1 --no-tags --branch=master $gh/ruby/ruby.git ./ruby
- name: Set up Ruby & MSYS2
timeout-minutes: 8
uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: mingw
mingw: clang-15
- name: Install/Update Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TC }}
- name: Configure bindgen
run: |
# Configure bindgen for msys2
$msys_root = $env:GHCUP_MSYS2.replace('\', '/')
if ($env:MSYSTEM -eq 'MINGW64') {
$msys_root += '/mingw64'
} elseif ($env:MSYSTEM -eq 'UCRT64') {
$msys_root += '/ucrt64'
} else {
echo "Unknown MSYSTEM: $env:MSYSTEM, cannot configure bindgen"
exit 1
}
# We can't use llvm-16 just yet due to backwards compatibility issues, so we have to workaround for now
echo "MSYS_ROOT=$msys_root" >> $env:GITHUB_ENV
echo "LIBCLANG_PATH=$msys_root/opt/llvm-15/bin" >> $env:GITHUB_ENV
echo "BINDGEN_EXTRA_CLANG_ARGS=`"--target=$env:RUST_TC --sysroot=$msys_root`"" >> $env:GITHUB_ENV
- name: Cache - .downloaded-cache
uses: actions/cache@v3
with:
path: .downloaded-cache
key: dl-cache-win-mingw-${{ hashFiles('ruby/gems/bundled_gems') }}
restore-keys: dl-cache-win-mingw-
- name: build & install
timeout-minutes: 30
run: ./1_0_build_install_msys2_64.ps1 mingw
- name: test
timeout-minutes: 70
run: ./2_0_test.ps1 mingw
- name: CLI Check Bash
shell: bash
run: ./cli_test_bash
- name: upload asset
timeout-minutes: 5
uses: ./.github/actions/upload-binary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
ruby_path: ./${{ env.PRE }}
- name: save log artifact
if: success() || failure()
uses: actions/upload-artifact@v1
with:
name: ${{ env.TEST_LOGS }}
path: ./logs