|
1 |
| -version: 2 |
2 |
| -jobs: |
3 |
| - build: |
4 |
| - macos: |
5 |
| - xcode: "14.2.0" |
6 |
| - |
| 1 | +version: 2.1 |
| 2 | + |
| 3 | +commands: |
| 4 | + run_solidity_formula: |
| 5 | + description: "Run Solidity homebrew formula" |
| 6 | + parameters: |
| 7 | + version: |
| 8 | + type: string |
| 9 | + default: "latest" |
| 10 | + formula: |
| 11 | + type: string |
| 12 | + default: "solidity" |
7 | 13 | steps:
|
8 | 14 | - checkout
|
9 |
| - |
10 | 15 | - run:
|
11 |
| - name: Install Solidity |
| 16 | + name: Install Solidity << parameters.version >> |
12 | 17 | command: |
|
13 | 18 | brew update
|
14 |
| - brew upgrade |
15 |
| - #brew tap ethereum/ethereum # Acutally we should use the rule from the pull request |
16 |
| - brew install ./solidity.rb |
| 19 | + # brew tap ethereum/ethereum # Actually we should use the rule from the pull request |
| 20 | + brew install ./<< parameters.formula >>.rb |
17 | 21 | no_output_timeout: 30m
|
18 | 22 |
|
19 | 23 | - run:
|
20 | 24 | name: Test Formula
|
21 |
| - command: brew test solidity.rb |
| 25 | + command: brew test << parameters.formula >> |
22 | 26 |
|
23 | 27 | - run:
|
24 | 28 | name: Test Solidity
|
25 | 29 | command: solc --version
|
26 | 30 |
|
27 | 31 | - run:
|
28 | 32 | name: Cleanup
|
29 |
| - command: brew uninstall boost cmake ccache solidity |
30 |
| - |
31 |
| - - run: |
32 |
| - name: Install Solidity 0.7 |
33 |
| - command: | |
34 |
| - brew update |
35 |
| - #brew tap ethereum/ethereum # Acutally we should use the rule from the pull request |
36 |
| - |
37 |
| - no_output_timeout: 30m |
38 |
| - |
39 |
| - - run: |
40 |
| - name: Test Formula |
41 |
| - command: brew test solidity@7 |
42 |
| - |
43 |
| - - run: |
44 |
| - name: Test Solidity |
45 |
| - command: solc --version |
46 |
| - |
47 |
| - - run: |
48 |
| - name: Cleanup |
49 |
| - command: brew uninstall boost cmake ccache solidity@7 |
50 |
| - |
51 |
| - - run: |
52 |
| - name: Install Solidity 0.6 |
53 |
| - command: | |
54 |
| - brew update |
55 |
| - #brew tap ethereum/ethereum # Acutally we should use the rule from the pull request |
56 |
| - |
57 |
| - no_output_timeout: 30m |
58 |
| - |
59 |
| - - run: |
60 |
| - name: Test Formula |
61 |
| - command: brew test solidity@6 |
62 |
| - |
63 |
| - - run: |
64 |
| - name: Test Solidity |
65 |
| - command: solc --version |
66 |
| - |
67 |
| - - run: |
68 |
| - name: Cleanup |
69 |
| - command: brew uninstall boost cmake ccache solidity@6 |
70 |
| - |
71 |
| - - run: |
72 |
| - name: Install Solidity 0.5 |
73 |
| - command: | |
74 |
| - brew update |
75 |
| - #brew tap ethereum/ethereum # Acutally we should use the rule from the pull request |
76 |
| - |
77 |
| - no_output_timeout: 30m |
| 33 | + command: brew uninstall boost cmake ccache << parameters.formula >> |
78 | 34 |
|
79 |
| - - run: |
80 |
| - name: Test Formula |
81 |
| - command: brew test solidity@5 |
82 |
| - |
83 |
| - - run: |
84 |
| - name: Test Solidity |
85 |
| - command: solc --version |
| 35 | +jobs: |
| 36 | + solidity_latest: &solidity_latest |
| 37 | + macos: |
| 38 | + xcode: 14.2.0 |
| 39 | + steps: |
| 40 | + - run_solidity_formula: |
| 41 | + version: "0.8" |
| 42 | + formula: "solidity" |
86 | 43 |
|
87 |
| - - run: |
88 |
| - name: Cleanup |
89 |
| - command: brew uninstall boost cmake ccache solidity@5 |
| 44 | + solidity_7: &solidity_7 |
| 45 | + macos: |
| 46 | + xcode: 13.2.1 |
| 47 | + steps: |
| 48 | + - run_solidity_formula: |
| 49 | + version: "0.7" |
| 50 | + formula: "solidity@7" |
90 | 51 |
|
91 |
| - - run: |
92 |
| - name: Install Solidity 0.4 |
93 |
| - command: | |
94 |
| - brew update |
95 |
| - #brew tap ethereum/ethereum # Acutally we should use the rule from the pull request |
96 |
| - |
97 |
| - no_output_timeout: 30m |
| 52 | + solidity_6: &solidity_6 |
| 53 | + macos: |
| 54 | + xcode: 13.2.1 |
| 55 | + steps: |
| 56 | + - run_solidity_formula: |
| 57 | + version: "0.6" |
| 58 | + formula: "solidity@6" |
98 | 59 |
|
99 |
| - - run: |
100 |
| - name: Test Formula |
101 |
| - command: brew test solidity@4 |
| 60 | + solidity_5: &solidity_5 |
| 61 | + macos: |
| 62 | + xcode: 13.2.1 |
| 63 | + steps: |
| 64 | + - run_solidity_formula: |
| 65 | + version: "0.5" |
| 66 | + formula: "solidity@5" |
102 | 67 |
|
103 |
| - - run: |
104 |
| - name: Test Solidity |
105 |
| - command: solc --version |
| 68 | + solidity_4: &solidity_4 |
| 69 | + macos: |
| 70 | + xcode: 13.2.1 |
| 71 | + steps: |
| 72 | + - run_solidity_formula: |
| 73 | + version: "0.4" |
| 74 | + formula: "solidity@4" |
106 | 75 |
|
| 76 | + geth: &geth |
| 77 | + macos: |
| 78 | + xcode: 14.2.0 |
| 79 | + steps: |
107 | 80 | - run:
|
108 | 81 | name: Install geth
|
109 | 82 | command: brew install ./ethereum.rb
|
| 83 | + |
| 84 | +workflows: |
| 85 | + main: |
| 86 | + jobs: |
| 87 | + - solidity_latest |
| 88 | + - solidity_7 |
| 89 | + - solidity_6 |
| 90 | + - solidity_5 |
| 91 | + - solidity_4 |
| 92 | + - geth |
0 commit comments