-
Notifications
You must be signed in to change notification settings - Fork 17
54 lines (42 loc) · 1.71 KB
/
install_ci.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
name: Install CI
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
install:
strategy:
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Install V
uses: vlang/[email protected]
with:
check-latest: true
- name: Install via webscript (Windows)
if: runner.os == 'Windows'
run: curl -o install.vsh https://raw.githubusercontent.com/vlang/v-analyzer/main/install.vsh; v run install.vsh; del install.vsh
- name: Install via webscript (nix)
if: runner.os != 'Windows'
run: v -e "$(curl https://raw.githubusercontent.com/vlang/v-analyzer/main/install.vsh -fsSL)"
- name: Verify installation success
run: ~/.config/v-analyzer/bin/v-analyzer --version
- name: Checkout v-analyzer
uses: actions/checkout@v4
- name: Cleanup and prepare installation
shell: bash
run: |
rm -r ~/.config/v-analyzer/bin/v-analyzer
mkdir Downloads
mv ./install.vsh Downloads/install.vsh
# While the webscript installation step tests the general functionality of direct installation via the web,
# regressions related to the install script would only become visible AFTER pushing changes to the main branch.
# We reduce the potential for errors by simulating downloading the script and running it separately.
- name: Install via local script
run: cd Downloads && v run install.vsh
- name: Verify installation success
run: ~/.config/v-analyzer/bin/v-analyzer --version