-
Notifications
You must be signed in to change notification settings - Fork 111
131 lines (118 loc) · 4.22 KB
/
win.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Build for Windows
on:
push: # All branches, but appropriate paths only.
paths:
# This workflow spec and its support scripts
- '.github/workflows/win.yml'
- 'scripts/ci/*msys.sh'
- 'scripts/ci/*build.sh'
- 'deploy/**'
# Relevant sources for this platform
- 'building/win*/**' # Makefile-based build scripts
- '*src/**' # Generated VMMaker sources (incl. plugins)
- 'platforms/Cross/**'
- 'platforms/win32/**'
# Skip changes in documentation artifacts
- '!**.md'
- '!**HowToBuild'
pull_request:
branches:
- Cog
paths:
# This workflow spec and its support scripts
- '.github/workflows/win.yml'
- 'scripts/ci/*msys.sh'
- 'scripts/ci/*build.sh'
- 'deploy/**'
# Relevant sources for this platform
- 'building/win*/**' # Makefile-based build scripts
- '*src/**' # Generated VMMaker sources (incl. plugins)
- 'platforms/Cross/**'
- 'platforms/win32/**'
# Skip changes in documentation artifacts
- '!**.md'
- '!**HowToBuild'
workflow_dispatch:
inputs:
tag:
description: "Build new release candidate for tag"
required: true
default: YYYYMMDDHHMM
jobs:
build:
strategy:
fail-fast: false
matrix:
arch:
- win64x64
- win32x86
flavor: # for selected pharo.* builds, see extra.yml
- squeak.cog.spur
- squeak.stack.spur
- squeak.sista.spur
mode:
- fast
- debug
- assert
runs-on: windows-2019
name: ${{ matrix.flavor }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }}
env:
ARCH: ${{ matrix.arch }}
FLAVOR: ${{ matrix.flavor }}
MODE: ${{ matrix.mode }}
steps:
- name: Checkout files
if: github.event_name != 'workflow_dispatch'
uses: actions/checkout@v3
- name: Checkout files for new release candidate
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v3
with:
ref: refs/tags/${{ github.event.inputs.tag }}
- name: Restore build cache
uses: actions/cache@v3
with:
path: .thirdparty-cache
key: thirdparty-cache-${{ matrix.arch }}-${{ matrix.flavor }}
# - name: Setup tmate debugging session
# uses: mxschmitt/action-tmate@v3
- name: Build VM
shell: bash
run: ./scripts/ci/actions_build.sh
# run: C:\msys64\usr\bin\bash -lc "cd $(pwd); exec ./scripts/ci/actions_build.sh"
env:
MSYS_SYS: ${{ matrix.arch == 'win64x64' && 'mingw64' || 'mingw32' }}
MSYS_ENV: ${{ matrix.arch == 'win64x64' && 'x86_64' || 'i686' }}
- name: Sign VM (not implemented)
if: false
run: ./deploy/sign-vm.sh
- name: Pack VM
shell: bash
run: ./deploy/pack-vm.sh
- name: Store artifact w/ revision
uses: actions/upload-artifact@v4
with:
name: ${{ env.ASSET_NAME }}_${{ env.ASSET_REVISION }}
path: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }}
- name: Update artifact in latest-build
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && endsWith(github.ref, 'Cog')
with:
prerelease: true
allowUpdates: true
replacesArtifacts: true
artifacts: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }}
body: ${{ github.event.head_commit.message }}
- name: Deploy artifact as new release candidate
uses: ncipollo/release-action@v1
if: github.event_name == 'workflow_dispatch'
with:
prerelease: true # release candidate
allowUpdates: true
replacesArtifacts: true
artifacts: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.tag }}
body: ${{ github.event.head_commit.message }}