Skip to content

Commit a9ca453

Browse files
authored
fix(CI): update mac-os version for github workflow (#242)
* feat: update mac-os version for github workflow * fix: package conflicts * fix: linter errors * chore: change swift version * chore: replace swift version step with official one * fix: remove make install from CI and run validation instead (lint+tests) * feat: move linter to dedicated workflow * feat: includes fastlane in gem file * fix: naming for ci-validation * fix: install variants before running tests * fix: update make path destination * fix: make path set order * fix: path installation for non linux * fix: set python version on github runner * feat: update gyb to python3 * fix: templates and utils pathing * chore: add temp value to test pipeline * chore: checking path for template in CI * chore: add more debugging for method in CI * chore: add more logging * chore: remove CI logging prints * fix: install bundler before bundle install * fix: disable coverage report due to issues with racc installation * docs: update documentation about Python version from 2.7 to 3
1 parent e6063f3 commit a9ca453

File tree

17 files changed

+413
-216
lines changed

17 files changed

+413
-216
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,29 @@ on:
88
branches: [ develop ]
99

1010
env:
11-
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
11+
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer
1212

1313
jobs:
1414
tests:
1515
name: Test with Swift ${{ matrix.swift }} on ${{ matrix.os }}
1616
runs-on: ${{ matrix.os }}
1717
strategy:
1818
matrix:
19-
os: [macos-12]
20-
swift: ["5.5"]
19+
os: [macos-14]
20+
swift: ["5.10"]
2121

2222
steps:
2323
- uses: actions/checkout@v2
24-
- uses: fwal/setup-swift@v1
24+
25+
- uses: swift-actions/setup-swift@v2
2526
with:
2627
swift-version: ${{ matrix.swift }}
2728

28-
- name: Make install
29+
- name: Install variants
2930
run: make install
30-
31-
- name: Tests
32-
run: make test
31+
32+
- name: Run CI validation
33+
run: make ci-validation
3334

3435
#
3536
# CODECOV temporarily disabled due to issues running 'bundle install'

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
source 'https://rubygems.org'
22

3+
gem "fastlane"
34
gem "slather"
45
gem "nokogiri", ">= 1.13.2"

Gemfile.lock

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,243 @@ GEM
88
i18n (>= 1.6, < 2)
99
minitest (>= 5.1)
1010
tzinfo (~> 2.0)
11+
addressable (2.8.7)
12+
public_suffix (>= 2.0.2, < 7.0)
13+
artifactory (3.0.17)
1114
atomos (0.1.3)
15+
aws-eventstream (1.3.0)
16+
aws-partitions (1.1037.0)
17+
aws-sdk-core (3.215.1)
18+
aws-eventstream (~> 1, >= 1.3.0)
19+
aws-partitions (~> 1, >= 1.992.0)
20+
aws-sigv4 (~> 1.9)
21+
jmespath (~> 1, >= 1.6.1)
22+
aws-sdk-kms (1.96.0)
23+
aws-sdk-core (~> 3, >= 3.210.0)
24+
aws-sigv4 (~> 1.5)
25+
aws-sdk-s3 (1.177.0)
26+
aws-sdk-core (~> 3, >= 3.210.0)
27+
aws-sdk-kms (~> 1)
28+
aws-sigv4 (~> 1.5)
29+
aws-sigv4 (1.11.0)
30+
aws-eventstream (~> 1, >= 1.0.2)
31+
babosa (1.0.4)
32+
base64 (0.2.0)
1233
claide (1.1.0)
1334
clamp (1.3.2)
35+
colored (1.2)
1436
colored2 (3.1.2)
37+
commander (4.6.0)
38+
highline (~> 2.0.0)
1539
concurrent-ruby (1.2.0)
40+
declarative (0.0.20)
41+
digest-crc (0.6.5)
42+
rake (>= 12.0.0, < 14.0.0)
43+
domain_name (0.6.20240107)
44+
dotenv (2.8.1)
45+
emoji_regex (3.2.3)
46+
excon (0.112.0)
47+
faraday (1.10.4)
48+
faraday-em_http (~> 1.0)
49+
faraday-em_synchrony (~> 1.0)
50+
faraday-excon (~> 1.1)
51+
faraday-httpclient (~> 1.0)
52+
faraday-multipart (~> 1.0)
53+
faraday-net_http (~> 1.0)
54+
faraday-net_http_persistent (~> 1.0)
55+
faraday-patron (~> 1.0)
56+
faraday-rack (~> 1.0)
57+
faraday-retry (~> 1.0)
58+
ruby2_keywords (>= 0.0.4)
59+
faraday-cookie_jar (0.0.7)
60+
faraday (>= 0.8.0)
61+
http-cookie (~> 1.0.0)
62+
faraday-em_http (1.0.0)
63+
faraday-em_synchrony (1.0.0)
64+
faraday-excon (1.1.0)
65+
faraday-httpclient (1.0.1)
66+
faraday-multipart (1.1.0)
67+
multipart-post (~> 2.0)
68+
faraday-net_http (1.0.2)
69+
faraday-net_http_persistent (1.2.0)
70+
faraday-patron (1.0.0)
71+
faraday-rack (1.0.0)
72+
faraday-retry (1.0.3)
73+
faraday_middleware (1.2.1)
74+
faraday (~> 1.0)
75+
fastimage (2.4.0)
76+
fastlane (2.226.0)
77+
CFPropertyList (>= 2.3, < 4.0.0)
78+
addressable (>= 2.8, < 3.0.0)
79+
artifactory (~> 3.0)
80+
aws-sdk-s3 (~> 1.0)
81+
babosa (>= 1.0.3, < 2.0.0)
82+
bundler (>= 1.12.0, < 3.0.0)
83+
colored (~> 1.2)
84+
commander (~> 4.6)
85+
dotenv (>= 2.1.1, < 3.0.0)
86+
emoji_regex (>= 0.1, < 4.0)
87+
excon (>= 0.71.0, < 1.0.0)
88+
faraday (~> 1.0)
89+
faraday-cookie_jar (~> 0.0.6)
90+
faraday_middleware (~> 1.0)
91+
fastimage (>= 2.1.0, < 3.0.0)
92+
fastlane-sirp (>= 1.0.0)
93+
gh_inspector (>= 1.1.2, < 2.0.0)
94+
google-apis-androidpublisher_v3 (~> 0.3)
95+
google-apis-playcustomapp_v1 (~> 0.1)
96+
google-cloud-env (>= 1.6.0, < 2.0.0)
97+
google-cloud-storage (~> 1.31)
98+
highline (~> 2.0)
99+
http-cookie (~> 1.0.5)
100+
json (< 3.0.0)
101+
jwt (>= 2.1.0, < 3)
102+
mini_magick (>= 4.9.4, < 5.0.0)
103+
multipart-post (>= 2.0.0, < 3.0.0)
104+
naturally (~> 2.2)
105+
optparse (>= 0.1.1, < 1.0.0)
106+
plist (>= 3.1.0, < 4.0.0)
107+
rubyzip (>= 2.0.0, < 3.0.0)
108+
security (= 0.1.5)
109+
simctl (~> 1.6.3)
110+
terminal-notifier (>= 2.0.0, < 3.0.0)
111+
terminal-table (~> 3)
112+
tty-screen (>= 0.6.3, < 1.0.0)
113+
tty-spinner (>= 0.8.0, < 1.0.0)
114+
word_wrap (~> 1.0.0)
115+
xcodeproj (>= 1.13.0, < 2.0.0)
116+
xcpretty (~> 0.4.0)
117+
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
118+
fastlane-sirp (1.0.0)
119+
sysrandom (~> 1.0)
120+
gh_inspector (1.1.3)
121+
google-apis-androidpublisher_v3 (0.54.0)
122+
google-apis-core (>= 0.11.0, < 2.a)
123+
google-apis-core (0.11.3)
124+
addressable (~> 2.5, >= 2.5.1)
125+
googleauth (>= 0.16.2, < 2.a)
126+
httpclient (>= 2.8.1, < 3.a)
127+
mini_mime (~> 1.0)
128+
representable (~> 3.0)
129+
retriable (>= 2.0, < 4.a)
130+
rexml
131+
google-apis-iamcredentials_v1 (0.17.0)
132+
google-apis-core (>= 0.11.0, < 2.a)
133+
google-apis-playcustomapp_v1 (0.13.0)
134+
google-apis-core (>= 0.11.0, < 2.a)
135+
google-apis-storage_v1 (0.31.0)
136+
google-apis-core (>= 0.11.0, < 2.a)
137+
google-cloud-core (1.7.1)
138+
google-cloud-env (>= 1.0, < 3.a)
139+
google-cloud-errors (~> 1.0)
140+
google-cloud-env (1.6.0)
141+
faraday (>= 0.17.3, < 3.0)
142+
google-cloud-errors (1.4.0)
143+
google-cloud-storage (1.47.0)
144+
addressable (~> 2.8)
145+
digest-crc (~> 0.4)
146+
google-apis-iamcredentials_v1 (~> 0.1)
147+
google-apis-storage_v1 (~> 0.31.0)
148+
google-cloud-core (~> 1.6)
149+
googleauth (>= 0.16.2, < 2.a)
150+
mini_mime (~> 1.0)
151+
googleauth (1.8.1)
152+
faraday (>= 0.17.3, < 3.a)
153+
jwt (>= 1.4, < 3.0)
154+
multi_json (~> 1.11)
155+
os (>= 0.9, < 2.0)
156+
signet (>= 0.16, < 2.a)
157+
highline (2.0.3)
158+
http-cookie (1.0.8)
159+
domain_name (~> 0.5)
160+
httpclient (2.8.3)
16161
i18n (1.12.0)
17162
concurrent-ruby (~> 1.0)
163+
jmespath (1.6.2)
164+
json (2.9.1)
165+
jwt (2.10.1)
166+
base64
167+
mini_magick (4.13.2)
168+
mini_mime (1.1.5)
169+
mini_portile2 (2.8.8)
18170
minitest (5.17.0)
171+
multi_json (1.15.0)
172+
multipart-post (2.4.1)
19173
nanaimo (0.3.0)
174+
naturally (2.2.1)
175+
nokogiri (1.13.8)
176+
mini_portile2 (~> 2.8.0)
177+
racc (~> 1.4)
20178
nokogiri (1.13.8-arm64-darwin)
21179
racc (~> 1.4)
22180
nokogiri (1.13.8-x86_64-darwin)
23181
racc (~> 1.4)
24182
nokogiri (1.13.8-x86_64-linux)
25183
racc (~> 1.4)
184+
optparse (0.6.0)
185+
os (1.1.4)
186+
plist (3.7.2)
187+
public_suffix (5.1.1)
26188
racc (1.6.0)
189+
rake (13.2.1)
190+
representable (3.2.0)
191+
declarative (< 0.1.0)
192+
trailblazer-option (>= 0.1.1, < 0.2.0)
193+
uber (< 0.2.0)
194+
retriable (3.1.2)
27195
rexml (3.2.5)
196+
rouge (3.28.0)
197+
ruby2_keywords (0.0.5)
198+
rubyzip (2.4.1)
199+
security (0.1.5)
200+
signet (0.19.0)
201+
addressable (~> 2.8)
202+
faraday (>= 0.17.5, < 3.a)
203+
jwt (>= 1.5, < 3.0)
204+
multi_json (~> 1.10)
205+
simctl (1.6.10)
206+
CFPropertyList
207+
naturally
28208
slather (2.7.2)
29209
CFPropertyList (>= 2.2, < 4)
30210
activesupport
31211
clamp (~> 1.3)
32212
nokogiri (~> 1.12)
33213
xcodeproj (~> 1.21)
214+
sysrandom (1.0.5)
215+
terminal-notifier (2.0.0)
216+
terminal-table (3.0.2)
217+
unicode-display_width (>= 1.1.1, < 3)
218+
trailblazer-option (0.1.2)
219+
tty-cursor (0.7.1)
220+
tty-screen (0.8.2)
221+
tty-spinner (0.9.3)
222+
tty-cursor (~> 0.7)
34223
tzinfo (2.0.6)
35224
concurrent-ruby (~> 1.0)
225+
uber (0.1.0)
226+
unicode-display_width (2.6.0)
227+
word_wrap (1.0.0)
36228
xcodeproj (1.22.0)
37229
CFPropertyList (>= 2.3.3, < 4.0)
38230
atomos (~> 0.1.3)
39231
claide (>= 1.0.2, < 2.0)
40232
colored2 (~> 3.1)
41233
nanaimo (~> 0.3.0)
42234
rexml (~> 3.2.4)
235+
xcpretty (0.4.0)
236+
rouge (~> 3.28.0)
237+
xcpretty-travis-formatter (1.0.1)
238+
xcpretty (~> 0.2, >= 0.0.7)
43239

44240
PLATFORMS
45241
arm64-darwin-21
242+
ruby
46243
x86_64-darwin-21
47244
x86_64-linux
48245

49246
DEPENDENCIES
247+
fastlane
50248
nokogiri (>= 1.13.2)
51249
slather
52250

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ else
66
detected_OS := $(shell uname)
77
endif
88

9-
ifeq ($(detected_OS),Linux) # Linux only
10-
prefix ?= ~/.local
11-
else
12-
prefix ?= /usr/local
13-
endif
14-
9+
prefix ?= ~/.local
1510
bindir ?= $(prefix)/bin
1611
libdir ?= $(prefix)/lib
1712
srcdir = Sources
@@ -72,6 +67,7 @@ endif
7267

7368
.PHONY: coverage
7469
coverage: test
70+
@gem install bundler
7571
@bundle install
7672
@bundle exec slather coverage --ignore ../**/*/Xcode\* --ignore Tests/\* --scheme VariantsCore Variants.xcodeproj/
7773

@@ -83,3 +79,8 @@ lint:
8379
validation: lint coverage
8480
@rm -rf variants.yml
8581
@echo "Ready to go."
82+
83+
.PHONY: ci-validation
84+
ci-validation: test
85+
@rm -rf variants.yml
86+
@echo "Ready to go."

Package.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let package = Package(
1717
),
1818
.package(
1919
url: "https://github.com/jpsim/Yams.git",
20-
from: "2.0.0"
20+
from: "5.0.0"
2121
),
2222
.package(
2323
name: "XcodeProj",
@@ -26,7 +26,7 @@ let package = Package(
2626
),
2727
.package(
2828
url: "https://github.com/apple/swift-argument-parser.git",
29-
from: "0.1.0"
29+
from: "1.0.0"
3030
),
3131
.package(
3232
url: "https://github.com/stencilproject/Stencil.git",
@@ -38,7 +38,9 @@ let package = Package(
3838
from: "3.5.0"
3939
),
4040
.package(
41-
url: "https://github.com/SimplyDanny/SwiftLintPlugins")
41+
url: "https://github.com/realm/SwiftLint",
42+
from: "0.58.0"
43+
)
4244
],
4345
targets: [
4446
.target(
@@ -48,8 +50,7 @@ let package = Package(
4850
"Yams",
4951
"XcodeProj",
5052
.product(name: "ArgumentParser", package: "swift-argument-parser"),
51-
"Stencil",
52-
"SwiftLintPlugins"
53+
"Stencil"
5354
]
5455
),
5556
.target(

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ This file is responsible for:
4545

4646
### Dependencies
4747

48-
In order to generate the code from templates, Variants requires Python 2.7. We recommend configuring the python version using a version management tool such as Pyenv.
48+
In order to generate the code from templates, Variants requires Python 3. We recommend configuring the python version using a version management tool such as Pyenv.
4949

5050
For details on how to install and use it check the [Pyenv repo](https://github.com/pyenv/pyenv).
5151

5252
### On Github Actions CI
5353

5454
See [Switching Variants on CI](docs/GITHUB_ACTION.md) for a better understanding and examples.
5555

56-
### Homebrew (recommended)
56+
### Homebrew **(recommended)**
5757

5858
```sh
5959
brew install backbase/m/variants
@@ -69,6 +69,16 @@ cd variants
6969
make install
7070
```
7171

72+
Once the installation is completed, the binary will be added to your `~/.local` folder. Make sure to have the folder included in your `PATH` variable. This should be done in the shell configuration file
73+
74+
Add the following to the `~/.zshrc` or `~/.bashrc` file:
75+
```sh
76+
export PATH=$HOME/.local/bin:/usr/local/bin:$PATH
77+
```
78+
79+
Make sure to restart your terminal or source the changed file with `source ~/.zshrc` or `source ~/.bashrc`
80+
81+
7282
### Swift Package Manager
7383

7484
#### Use as CLI

0 commit comments

Comments
 (0)