-
Notifications
You must be signed in to change notification settings - Fork 95
128 lines (117 loc) · 3.65 KB
/
validate-install.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
on:
pull_request:
push:
name: Validate Install
jobs:
package_linux_release:
name: Package Linux Release
runs-on: ubuntu-latest
steps:
- name: Checkout Polaris
uses: actions/checkout@v1
- name: Make release
uses: ./.github/actions/make-linux-release
with:
version-number: "0.0.0"
output-file: polaris.tar.gz
- name: Upload packaged release
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: linux-release
path: polaris.tar.gz
validate_linux_system_install:
name: Linux System Install
runs-on: ubuntu-latest
needs: package_linux_release
steps:
- name: Download release
uses: actions/download-artifact@v4
with:
name: linux-release
path: .
- name: Extract release
run: tar -xzvf polaris.tar.gz --strip-components=1
- name: Preview Install
run: make preview
- name: Preview Install w/ Custom Prefix
run: make preview PREFIX=/some/random/prefix
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install
run: sudo --preserve-env=PATH make install
- name: Run Polaris
run: sudo /usr/local/bin/polaris && sleep 5s
- name: Make a request
run: curl -f http://localhost:5050
- name: Stop Polaris
run: sudo kill -KILL $(sudo cat /usr/local/var/run/polaris/polaris.pid)
- name: Uninstall
run: sudo make uninstall
validate_linux_xdg_install:
name: Linux XDG Install
runs-on: ubuntu-latest
needs: package_linux_release
steps:
- name: Download release
uses: actions/download-artifact@v4
with:
name: linux-release
path: .
- name: Extract release
run: tar -xzvf polaris.tar.gz --strip-components=1
- name: Preview Install
run: make preview-xdg
- name: Preview Install w/ Custom XDG_DATA_HOME
run: make preview-xdg XDG_DATA_HOME=/my/own/xdg/home
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install
run: make install-xdg
- name: Run Polaris
run: $HOME/.local/bin/polaris && sleep 5s
- name: Make a request
run: curl -f http://localhost:5050
- name: Stop Polaris
run: kill -KILL $(cat /tmp/polaris-1001/polaris.pid)
- name: Uninstall
run: make uninstall-xdg
package_windows_release:
name: Package Windows Release
runs-on: windows-latest
steps:
- name: Checkout Polaris
uses: actions/checkout@v1
- name: Install Rust Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Make release
uses: ./.github/actions/make-windows-release
with:
version-number: "0.0.0"
output-file: polaris.msi
- name: Upload packaged release
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: windows-release
path: polaris.msi
validate_windows_install:
name: Windows Install
runs-on: windows-latest
needs: package_windows_release
steps:
- name: Download release
uses: actions/download-artifact@v4
with:
name: windows-release
path: .
- name: Install
run: msiexec /i polaris.msi /qn
- name: Run Polaris
run: |
start $env:LOCALAPPDATA/Permafrost/Polaris/polaris-cli.exe
sleep 5
- name: Make a request
run: curl -f http://localhost:5050
- name: Stop Polaris
run: taskkill /IM polaris-cli.exe
- name: Uninstall
run: msiexec /x polaris.msi /qn