-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (73 loc) · 1.79 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
name: build
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
actions: none
checks: none
contents: read
deployments: none
issues: none
packages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
jobs:
linux:
runs-on: ubuntu-20.04
defaults:
run:
shell: sh
steps:
- name: Cancel previous runs
if: github.event_name == 'pull_request'
uses: styfle/cancel-workflow-action@0.9.1
- uses: actions/checkout@v2
- name: Install dotfiles
run: sh install.sh
- name: Install dependencies
run: |
sudo apt-get install --no-install-recommends --yes \
devscripts \
shellcheck
- name: Check Bash-isms
run: checkbashisms install.sh
- name: ShellCheck
run: |
shellcheck --shell=dash install.sh install-system.sh lib/*.sh
shellcheck --shell=bash src/.bashrc.d/*.sh
- name: Run .bashrc and show environment
shell: bash
run: |
source ~/.bashrc
env
- name: Install system-level packages
run: |
yes | sudo sh install-system.sh
sudo apt update
- name: Ensure idempotency
run:
sh install.sh
yes | sudo sh install-system.sh
windows:
runs-on: windows-2019
defaults:
run:
shell: bash
steps:
- name: Cancel previous runs
if: github.event_name == 'pull_request'
uses: styfle/cancel-workflow-action@0.9.1
- uses: actions/checkout@v2
- name: Install dotfiles
run: sh install.sh
shell: bash
- name: Ensure idempotency
run: sh install.sh
shell: bash