-
Notifications
You must be signed in to change notification settings - Fork 4
70 lines (57 loc) · 1.78 KB
/
installation.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
name: installation
on:
push:
paths:
- "install.sh"
- "install.sp1"
- ".github/workflows/installation.yml"
pull_request:
paths:
- "install.sh"
- "install.sp1"
- ".github/workflows/installation.yml"
workflow_dispatch:
schedule:
- cron: "0 0 * * 0" # run ci weekly
jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, ubuntu-latest, windows-latest]
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: full
CARGO_TERM_COLOR: always
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install with shell
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
run: |
sh ./install.sh
echo "${HOME}/.cask/bin" >> $GITHUB_PATH
- name: Install with powershell
if: startsWith(matrix.os, 'windows')
run: |
./install.ps1
# here, cask is already installed
cask --version
# make sure $HOME/.cask/bin has been add to $PATH
cask ls
# However, PowerShell settings will fail in the next step, so add environment variables here.
echo "${HOME}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${HOME}\.cask\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Run cask command
continue-on-error: true
run: |
cask --help
# make sure $HOME/.cask/bin has been add to $PATH
cask ls
# try print information of package
cask info github.com/axetroy/gpm.rs
# install package
cask install github.com/axetroy/gpm.rs
# run installed package
gpm --help