ucrt #3856
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ucrt | |
on: | |
push: | |
branches: | |
- '*' | |
schedule: | |
- cron: '55 1,8,15 * * *' | |
workflow_dispatch: | |
jobs: | |
ucrt: | |
strategy: | |
fail-fast: false | |
runs-on: windows-2022 | |
env: | |
PRE: ruby-ucrt | |
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: Set up Ruby & MSYS2 | |
timeout-minutes: 8 | |
uses: ruby/setup-ruby-pkgs@v1 | |
with: | |
ruby-version: 3.2 | |
mingw: clang | |
- name: Get Ruby and RubyInstaller2 repos | |
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 | |
cd ruby | |
ruby ../git_log_utc.rb | |
- 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@v4 | |
with: | |
path: .downloaded-cache | |
key: dl-cache-win-ucrt-${{ hashFiles('ruby/gems/bundled_gems') }} | |
restore-keys: dl-cache-win-ucrt- | |
- name: build & install | |
timeout-minutes: 30 | |
run: ./1_0_build_install_msys2_64.ps1 ucrt | |
- name: test | |
timeout-minutes: 70 | |
run: ./2_0_test.ps1 ucrt | |
- 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@v4 | |
with: | |
name: ${{ env.TEST_LOGS }} | |
path: ./logs |