-
Notifications
You must be signed in to change notification settings - Fork 6
91 lines (78 loc) · 2.49 KB
/
mswin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: mswin
on:
push:
branches:
- '*'
schedule:
- cron: '35 1,8,15 * * *'
workflow_dispatch:
jobs:
mswin:
strategy:
matrix:
vs: [2022]
fail-fast: false
runs-on: windows-${{ matrix.vs }}
env:
PRE: ruby-mswin
steps:
- name: git config
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- name: repo checkout
uses: actions/checkout@v4
- name: load ruby
timeout-minutes: 12
uses: ruby/setup-ruby@v1
with:
ruby-version: mswin
# cert file is created with RubyInstaller2
- 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: stable-x86_64-pc-windows-msvc
components: rustfmt
- name: Configure bindgen
run: |
echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
echo "BINDGEN_EXTRA_CLANG_ARGS=$((gcm clang).source -replace "bin\clang.exe","include")" >> $env:GITHUB_ENV
echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")"
echo "BINDGEN_EXTRA_CLANG_ARGS=$((gcm clang).source -replace "bin\clang.exe","include")"
- name: Cache - .downloaded-cache
uses: actions/cache@v4
with:
path: .downloaded-cache
key: dl-cache-win-mswin-${{ hashFiles('ruby/gems/bundled_gems') }}
- name: build & install
timeout-minutes: 30
run: ./1_0_build_install_mswin.ps1
- name: test
timeout-minutes: 70
run: ./2_0_test.ps1 mswin
env:
APPVEYOR: 'True'
- 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