-
Notifications
You must be signed in to change notification settings - Fork 96
81 lines (81 loc) · 2.62 KB
/
windows.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
name: Windows
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
make:
strategy:
matrix:
include:
- os: windows-2019
vs: 2019
fail-fast: false
runs-on: ${{ matrix.os }}
env:
ENCLOSE_IO_RUBYC_ADDTIONAL_ARGS: --tmpdir=C:\rubyc_tmp
steps:
- uses: ilammy/setup-nasm@v1
- uses: actions/checkout@v2
- name: "[Enclose.IO] Install libraries"
run: |
choco install --no-progress squashfs
- name: "[Enclose.IO] Set up Ruby"
uses: ruby/setup-ruby@v1
- name: "[Enclose.IO] Install rubocop"
run: gem install rubocop
- name: "[Enclose.IO] Run rubocop"
run: rubocop
- name: "[Enclose.IO] Install dependencies"
run: bundle install
- name: "[Enclose.IO] Set up Perl"
run: |
choco install strawberryperl
echo "##[add-path]C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin"
- name: "[Enclose.IO] Inspect Windows Environment"
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
echo on
wmic OS get OSArchitecture
echo %PROCESSOR_ARCHITECTURE%
set
systeminfo
where perl
perl -V
where nmake
where mksquashfs
mksquashfs -version
where ruby
ruby -v
where bundle
bundle -v
shell: cmd
- name: "[Enclose.IO] Rake"
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
mkdir C:\rubyc_tmp
bundle exec rake
shell: cmd
- name: "[Enclose.IO] Create Windows Release"
if: ${{ github.ref == 'refs/heads/master' && success() }}
id: create_windows_release
uses: pmq20/create-release@delete-old-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: windows-x64
release_name: Latest Windows Pre-release
draft: false
prerelease: true
replace_old_tag: true
- name: "[Enclose.IO] Upload Windows Release"
if: ${{ github.ref == 'refs/heads/master' && success() }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_windows_release.outputs.upload_url }}
asset_path: ./rubyc.exe
asset_name: rubyc.exe
asset_content_type: application/octet-stream