forked from msys2/msys2-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
140 lines (121 loc) · 4.04 KB
/
build.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
132
133
134
135
136
137
138
139
140
name: 'build'
on:
push:
branches:
- '*'
tags:
- '*'
concurrency: nope
jobs:
build-installer:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
scalaVersion: [2.11, 2.12, 2.13]
spinalVersion: [1.6.4, 1.8.2, 1.9.3]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: setup-msys2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
tar
zip
unzip
git
mingw-w64-x86_64-qt-installer-framework
mingw-w64-x86_64-7zip
- name: Switch to the main mirror
shell: msys2 {0}
run: |
echo 'Server = https://repo.msys2.org/mingw/$repo/' > /etc/pacman.d/mirrorlist.mingw
echo 'Server = https://repo.msys2.org/msys/$arch/' > /etc/pacman.d/mirrorlist.msys
pacman-conf.exe
- name: Update using the main mirror & Check install
run: |
msys2 -c 'pacman --noconfirm -Suuy'
msys2 -c 'pacman --noconfirm -Suu'
msys2 -c 'pacman -Qkq'
- name: Build Installer
shell: msys2 {0}
run: |
bash make-msys2-installer ${{ matrix.scalaVersion }} ${{ matrix.spinalVersion }}
- name: Create 'latest' Variants and Checksums
run: |
sha256sum.exe msys2-*
sha256sum.exe msys2-* > msys2-checksums.txt
- name: Upload Results
uses: actions/upload-artifact@v3
with:
name: installer
path: msys2-*
test-installer:
name: installer-${{ matrix.image }}
runs-on: windows-${{ matrix.image }}
needs: build-installer
strategy:
fail-fast: false
matrix:
image: [2019, 2022]
scalaVersion: [2.11, 2.12, 2.13]
spinalVersion: [1.6.4, 1.8.2, 1.9.3]
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: installer
- name: Install
run: |
./msys2-x86_64-${{ matrix.scalaVersion }}-${{ matrix.spinalVersion }}.exe in --confirm-command --accept-messages --root C:/msys2-install-test
- name: Test without Login Shell
run: |
C:\msys2-install-test\usr\bin\pacman.exe -Syy
C:\msys2-install-test\usr\bin\pacman.exe --noconfirm -S vim
- name: Test
run: |
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman --version"
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman -Qkv"
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman -Syy"
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman --noconfirm -S git"
- name: Uninstall
run: |
C:\msys2-install-test\uninstall.exe pr --confirm-command
upload-nightly:
permissions:
contents: write
needs:
- test-installer
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: installer
- name: Set Release Tag
id: set_tag
if: startsWith(github.ref, 'refs/heads/')
run: branch_name=${{ github.ref }} echo "::set-output name=tag_name::${branch_name/refs\/heads\//}-$(date +'%Y%m%d%H%M%S')"
- name: Upload Installers
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/heads/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.set_tag.outputs.tag_name }}
draft: true
body: ${{ github.event.head_commit.message }}
files: |
msys2-*
- name: Upload Installers with Tag
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: ${{ github.event.head_commit.message }}
files: |
msys2-*