forked from Mudlet/Mudlet
-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (98 loc) · 3.65 KB
/
build-mudlet-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
name: 🔨 Build Mudlet (windows)
on:
push:
branches: [gha_debug, master, development, release-*]
tags: [Mudlet-*]
pull_request:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'
jobs:
compile-mudlet:
name: ${{matrix.buildname}}
runs-on: ${{matrix.os}}
if: ${{ github.repository_owner == 'Mudlet' }} || ${{ github.repository_owner == 'jmckisson' }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
buildname: 'windows64'
- os: windows-2019
buildname: 'windows32'
steps:
- name: Checkout Mudlet source code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: (Windows 64) Setup MSYS2
if: matrix.buildname == 'windows64'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
- name: (Windows 32) Setup MSYS2
if: matrix.buildname == 'windows32'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
update: true
- name: (Windows) Build Environment Setup
shell: msys2 {0}
env:
GITHUB_REPO_TAG: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
run: |
$GITHUB_WORKSPACE/CI/setup-windows-sdk.sh
$GITHUB_WORKSPACE/CI/validate-deployment-for-windows.sh
- name: restore ccache
uses: actions/cache@v4
with:
path: ${{runner.workspace}}/ccache
key: ccache-${{matrix.os}}-${{matrix.buildname}}-${{ github.sha }}
restore-keys: ccache-${{matrix.os}}-${{matrix.buildname}}
save-always: true
- name: check ccache stats prior to build
shell: msys2 {0}
run: ccache --zero-stats --show-stats
- name: (Windows) Build
shell: msys2 {0}
env:
GITHUB_REPO_TAG: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
GITHUB_SCHEDULED_BUILD: ${{ github.event_name == 'schedule' }}
GITHUB_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: $GITHUB_WORKSPACE/CI/build-mudlet-for-windows.sh
- name: check ccache stats post build
shell: msys2 {0}
run: ccache --show-stats
- name: (Windows) Package
shell: msys2 {0}
run: $GITHUB_WORKSPACE/CI/package-mudlet-for-windows.sh
- name: (Windows) Deploy
shell: msys2 {0}
env:
DBLSQD_USER: ${{secrets.DBLSQD_USER}}
DBLSQD_PASS: ${{secrets.DBLSQD_PASS}}
DEPLOY_KEY_PASS: ${{secrets.DEPLOY_KEY_PASS}}
WIN_SIGNING_PASS: ${{secrets.WIN_SIGNING_PASS}}
GITHUB_REPO_NAME: ${{ github.repository }}
GITHUB_REPO_TAG: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
GITHUB_SCHEDULED_BUILD: ${{ github.event_name == 'schedule' }}
GITHUB_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: $GITHUB_WORKSPACE/CI/deploy-mudlet-for-windows.sh
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
- name: Upload packaged Mudlet
uses: actions/upload-artifact@v4
if: env.UPLOAD_FILENAME
with:
name: ${{env.UPLOAD_FILENAME}}
path: ${{env.FOLDER_TO_UPLOAD}}
- name: Submit to make.mudlet.org
if: env.UPLOAD_FILENAME
run: |
$uri = "http://96.249.249.100:8055/~med/ci-snapshots/gha_queue.php?artifact_name=$($env:UPLOAD_FILENAME)&unzip=0"
Invoke-WebRequest -Uri $uri -Method Post
shell: pwsh