Skip to content

Commit 24d2cdd

Browse files
Merge branch 'master' into webpack-fixes
2 parents f35e00f + 3449062 commit 24d2cdd

File tree

7 files changed

+126
-8
lines changed

7 files changed

+126
-8
lines changed

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ gem 'jekyll-assets'
1313
# https://nvd.nist.gov/vuln/detail/CVE-2018-16470
1414
gem "rack", ">= 2.0.6"
1515

16+
# https://nvd.nist.gov/vuln/detail/CVE-2018-14404
17+
gem "nokogiri", ">= 1.8.5"
18+
1619
group :jekyll_plugins do
1720
gem 'jekyll-algolia', '~> 1.0'
1821
end

Gemfile.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ GEM
9797
mercenary (0.3.6)
9898
mini_portile2 (2.3.0)
9999
minitest (5.11.3)
100-
nokogiri (1.8.4)
100+
nokogiri (1.8.5)
101101
mini_portile2 (~> 2.3.0)
102102
parallel (1.12.1)
103103
pathutil (0.16.1)
@@ -136,6 +136,7 @@ DEPENDENCIES
136136
jekyll-algolia (~> 1.0)
137137
jekyll-assets
138138
jekyll-sitemap
139+
nokogiri (>= 1.8.5)
139140
rack (>= 2.0.6)
140141

141142
RUBY VERSION

jekyll/_cci2/demo-apps.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Language Guide | Framework | GitHub Repo Name
1919
[Go]{:target="_blank"} | Go | [circleci-demo-go]{:target="_blank"}
2020
[iOS]{:target="_blank"} | Xcode | [circleci-demo-ios]{:target="_blank"}
2121
[iOS](https://github.com/CircleCI-Public/circleci-demo-react-native/blob/master/README.md){:target="_blank"} | React Native | [circleci-demo-react-native]{:target="_blank"}
22+
[macOS]({{ site.baseurl }}/2.0/hello-world-macos){:target="_blank_"} | MacOS | [circleci-demo-macos]{:target="_blank"}
2223
[Java]{:target="_blank"} | Spring | [circleci-demo-java-spring]{:target="_blank"}
2324
[JavaScript]{:target="_blank"} | React | [circleci-demo-javascript-express]{:target="_blank"}
2425
[PHP]{:target="_blank"} | Laravel | [circleci-demo-php-laravel]{:target="_blank"}
@@ -65,6 +66,7 @@ Refer to the [Getting Started Introduction]({{ site.baseurl }}/2.0/getting-start
6566
[circleci-demo-java-spring]: https://github.com/CircleCI-Public/circleci-demo-java-spring
6667
[circleci-demo-javascript-express]: https://github.com/CircleCI-Public/circleci-demo-javascript-express
6768
[circleci-demo-ios]: https://github.com/CircleCI-Public/circleci-demo-ios
69+
[circleci-demo-macos]: https://github.com/CircleCI-Public/circleci-demo-macos
6870
[circleci-demo-php-laravel]: https://github.com/CircleCI-Public/circleci-demo-php-laravel
6971
[circleci-demo-python-django]: https://github.com/CircleCI-Public/circleci-demo-python-django
7072
[circleci-demo-python-flask]: https://github.com/CircleCI-Public/circleci-demo-python-flask

jekyll/_cci2/hello-world-macos.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
layout: classic-docs
3+
title: "Hello World On MacOS"
4+
short-title: "Hello World On MacOS"
5+
description: "First macOS project on CircleCI 2.0"
6+
categories: [getting-started]
7+
order: 4
8+
---
9+
10+
This document describes how to get started with continuous integration on **macOS
11+
build environments** on CircleCI. If you still need to get acquainted with
12+
CircleCI, it is recommended to checkout the [getting started guide]({{ site.baseurl }}/2.0/getting-started).
13+
14+
## Prerequisites
15+
16+
To follow along with this document you will need:
17+
18+
- An [account](https://circleci.com/signup/) on CircleCI.
19+
- A subscription to a [paid plan](https://circleci.com/pricing/#build-os-x) to enable building on the macOS executor.
20+
- An Apple computer with XCode installed on it (if you want to open the example project).
21+
22+
## Overview Of The macOS Executor
23+
24+
The macOS build environment (or `executor`) is used for iOS and macOS
25+
development, allowing you to test, build, and deploy macOS and iOS applications on
26+
CircleCI. The macOS executor runs jobs in a macOS environment and provides access to iPhone, iPad, Apple Watch and Apple TV simulators.
27+
28+
Before we get to setting up the macOS executor, we will need to setup our example application.
29+
30+
## Example Application
31+
32+
The example application is a simple mac app - it runs a 5 minute
33+
timer and contains a single unit test (real-world applications
34+
will be far more complex; this app simply serves as an introduction to the macOS
35+
build environment).
36+
37+
As a user getting to know the macOS build environment, our ideal scenario is for CircleCI to help with the following:
38+
39+
- Run tests using XCode on the macOS VM whenever we push code.
40+
- Create and upload the compiled application as an artifact after tests have run successfully.
41+
42+
You can checkout the example application's repo on
43+
[Github](https://github.com/CircleCI-Public/circleci-demo-macos).
44+
45+
## Example Configuration File
46+
47+
Our application does not make use of any external tools or dependencies, so we
48+
have a fairly simple `.circleci/config.yml` file. Below, each line is commented
49+
to indicate what is happening at each step.
50+
51+
```yaml
52+
version: 2 # use version 2.0 of CircleCI
53+
jobs: # a basic unit of work in a run
54+
build: # runs not using `Workflows` must have a `build` job as entry point
55+
macos: # indicate that we are using the macOS executor
56+
xcode: "10.0.0" # indicate our selected version of Xcode
57+
steps: # a series of commands to run
58+
- checkout # pull down code from your version control system.
59+
- run:
60+
# run our tests using xcode's cli tool `xcodebuild`
61+
name: Run Unit Tests
62+
command: xcodebuild test -scheme circleci-demo-macos
63+
- run:
64+
# build our application
65+
name: Build Application
66+
command: xcodebuild
67+
- run:
68+
# compress Xcode's build output so that it can be stored as an artifact
69+
name: Compress app for storage
70+
command: zip -r app.zip build/Release/circleci-demo-macos.app
71+
- store_artifacts: # store this build output. Read more: https://circleci.com/docs/2.0/artifacts/
72+
path: app.zip
73+
destination: app
74+
```
75+
76+
If this is your first exposure to a CircleCI `config.yml`, some of the above
77+
might seem a bit confusing. In the section below you can find some links that
78+
provide a more in-depth overview of how a `config.yml` works.
79+
80+
Since this is a general introduction to building on MacOs, the `config.yml` above example covers the following:
81+
82+
- Picking an [`executor`]({{ site.baseurl }}/2.0/configuration-reference/#docker--machine--macosexecutor) to use
83+
- Pulling code via the [`checkout`]({{ site.baseurl }}/2.0/configuration-reference/#checkout) key
84+
- Running tests with Xcode
85+
- Building our application
86+
- Compressing our application and storing it with the [`store_artifacts`]({{
87+
site.baseurl }}/2.0/configuration-reference/#store_artifacts) key.
88+
89+
You can learn more about the `config.yml` file in the [configuration reference guide]({{site.baseurl}}/2.0/configuration-reference/).
90+
91+
## Next Steps
92+
93+
The macOS executor is commonly used for testing and building iOS applications,
94+
which can be more complex in their continuous integrations configuration. If you
95+
are interested in building and/or testing iOS applications, consider checking
96+
out our following docs that further explore this topic:
97+
98+
- [Testing iOS Applications on macOS]({{ site.baseurl }}/2.0/testing-ios)
99+
- [iOS Project Tutorial]({{ site.baseurl }}/2.0/ios-tutorial)
100+
- [Setting Up Code Signing for iOS Projects]({{ site.baseurl }}/2.0/ios-codesigning)
101+
102+
Also, consider reading documentation on some of CircleCI's features:
103+
104+
- See the [Concepts]({{ site.baseurl }}/2.0/concepts/) document for a summary of 2.0 configuration and the hierarchy of top-level keys in a `.circleci/config.yml` file.
105+
106+
- Refer to the [Workflows]({{ site.baseurl }}/2.0/workflows) document for examples of orchestrating job runs with parallel, sequential, scheduled, and manual approval workflows.
107+
108+
- Find complete reference information for all keys and pre-built Docker images in the [Configuring CircleCI]({{ site.baseurl }}/2.0/configuration-reference/) and [CircleCI Images]({{ site.baseurl }}/2.0/circleci-images/) documentation, respectively.

jekyll/_cci2/language-haskell.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/
4242
name: Restore Cached Dependencies
4343
keys:
44-
- cci-demo-haskell-v1-{{ checksum "package.yaml" }}
44+
- cci-demo-haskell-v1-{{ checksum "package.yaml" }}-{{ checksum "stack.yaml" }}
4545
- run:
4646
name: Resolve/Update Dependencies
4747
command: stack setup
@@ -53,8 +53,9 @@ jobs:
5353
command: stack install
5454
- save_cache:
5555
name: Cache Dependencies
56-
key: cci-demo-haskell-v1-{{ checksum "package.yaml" }}
56+
key: cci-demo-haskell-v1-{{ checksum "package.yaml" }}-{{ checksum "stack.yaml" }}
5757
paths:
58+
- ".stack"
5859
- ".stack-work"
5960
- store_artifacts:
6061
# Upload test summary for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
@@ -113,24 +114,24 @@ compiler as specified in the `stack.yaml` config.
113114
- restore_cache:
114115
name: Restore Cached Dependencies
115116
keys:
116-
- cci-demo-haskell-v1-{{ checksum "package.yaml" }}
117+
- cci-demo-haskell-v1-{{ checksum "package.yaml" }}-{{ checksum "stack.yaml" }}
117118
- run:
118119
name: Resolve/Update Dependencies
119120
command: stack setup
120121
- save_cache:
121122
name: Cache Dependencies
122-
key: cci-demo-haskell-v1-{{ checksum "package.yaml" }}
123+
key: cci-demo-haskell-v1-{{ checksum "package.yaml" }}-{{ checksum "stack.yaml" }}
123124
paths:
124125
- ~/.stack
125126
- ~/.stack-work
126127
```
127128
{% endraw %}
128129

129130
Note: It's also possible to use a `cabal` build file for caching dependencies.
130-
`stack`, however, is commonly recommended especially for those new to the Haskell ecosystem. Because this
131-
demo app leverages `stack.yaml` and `package.yaml`, we use the latter as the
131+
`stack`, however, is commonly recommended, especially for those new to the Haskell ecosystem. Because this
132+
demo app leverages `stack.yaml` and `package.yaml`, we use these two files as the
132133
cache key for our dependencies. You can read more about the differences between
133-
`stack` and `cabal` on [The Haskell Tool Stack docs](https://docs.haskellstack.org/en/stable/stack_yaml_vs_cabal_package_file/#why-specify-deps-twice).
134+
`stack` and `cabal` on [The Haskell Tool Stack docs](https://docs.haskellstack.org/en/stable/stack_yaml_vs_cabal_package_file/).
134135

135136
Finally, we can run our application build commands. We'll run our tests first
136137
and then move on to install our executable. Running `stack install` will create

jekyll/_cci2/tutorials.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Language in which your App is written | Framework | GitHub Repo Name
3030
[Haskell]({{ site.baseurl }}/2.0/language-haskell/) | Scotty | [circleci-demo-haskell](https://github.com/CircleCI-Public/circleci-demo-haskell)
3131
[iOS] | Xcode | [circleci-demo-ios]
3232
[iOS](https://github.com/CircleCI-Public/circleci-demo-react-native/blob/master/README.md) | React Native | [circleci-demo-react-native]
33+
[macOS](https://github.com/CircleCI-Public/circleci-demo-macos) | MacOS | [circleci-demo-macos](https://github.com/CircleCI-Public/circleci-demo-macos)
3334
[Java] | Spring | [circleci-demo-java-spring]
3435
[JavaScript](https://github.com/CircleCI-Public/circleci-demo-react-native/blob/master/README.md) | React Native | [circleci-demo-react-native]
3536
[NodeJS - JavaScript] | React | [circleci-demo-javascript-express]

jekyll/_data/sidenav.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ en:
2323
link: 2.0/first-steps/
2424
- name: Hello World
2525
link: 2.0/hello-world/
26+
- name: Hello World MacOS
27+
link: 2.0/hello-world-macos/
2628
- name: FAQ
2729
link: 2.0/faq/
2830
- name: Concepts

0 commit comments

Comments
 (0)