-
Notifications
You must be signed in to change notification settings - Fork 14
115 lines (101 loc) · 3.27 KB
/
main.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
name: run-tests
on:
pull_request: # Should trigger on pull requests for all branches
branches:
- '**' # Matches all branches
jobs:
tests-exe: # Run tests for pnut-exe on all supported platforms and architectures
strategy:
matrix:
include:
- target: i386
host: ubuntu-latest
- target: x86_64
host: ubuntu-latest
- target: mac_os
host: macos-latest
runs-on: ${{ matrix.host }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run ${{ matrix.target }} tests on ${{ matrix.host }}
run: |
set -e
./run-tests.sh ${{ matrix.target }}
tests-shell: # Run tests for pnut-sh on all supported shells
strategy:
matrix:
shell: ["bash", "dash", "ksh", "mksh", "yash", "zsh"]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install ${{ matrix.shell }} shell
run: |
sudo apt-get update
sudo apt-get install -y bash ${{ matrix.shell }}
- name: Run tests with ${{ matrix.shell }}
run: |
set -e
bash ./run-tests.sh sh --shell ${{ matrix.shell }}
bootstrap-pnut-sh:
strategy:
matrix:
shell: ["bash", "dash", "ksh", "mksh", "yash", "zsh"]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install ${{ matrix.shell }} shell
run: |
sudo apt-get update
sudo apt-get install -y bash ${{ matrix.shell }}
- name: Bootstrap pnut.sh on ${{ matrix.shell }}
run: |
set -e
bash ./bootstrap-pnut.sh --shell ${{ matrix.shell }}
bootstrap-pnut-exe:
strategy:
matrix:
shell: ["dash", "ksh"] # Not testing on other shells to save time
include:
- target: i386
host: ubuntu-latest
- target: x86_64
host: ubuntu-latest
- target: mac_os
host: macos-latest
runs-on: ${{ matrix.host }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install ${{ matrix.shell }} shell
run: |
if [ ${{ matrix.host }} = "macos-latest" ]; then
brew install ${{ matrix.shell }}
else
sudo apt-get update
sudo apt-get install -y ${{ matrix.shell }}
fi
- name: Bootstrap pnut-exe with ${{ matrix.target }} backend
run: |
set -e
./bootstrap-pnut-exe.sh --backend ${{ matrix.target }}
- name: Bootstrap pnut-exe with ${{ matrix.target }} backend on ${{ matrix.shell }}
run: |
set -e
./bootstrap-pnut-exe.sh --backend ${{ matrix.target }} --shell ${{ matrix.shell }}
success-message:
runs-on: ubuntu-latest
needs: [tests-exe, tests-shell, bootstrap-pnut-sh, bootstrap-pnut-exe]
steps:
- name: Tests finished
run: |
echo " ,-~~-.___."
echo " / | ' \\ Pnut tests completed...."
echo "( ) 0"
echo " \\_/-, ,----'"
echo " ==== //"
echo " / \\-'~; /~~~(O)"
echo " / __/~| / |"
echo "=( _____| (_________| "