Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit 9e34851

Browse files
committed
Update to a Workflow based configuration
Change to a Workflow based configuration, allowing us to concurrently build on both Stable and Beta channels.
1 parent 1dade93 commit 9e34851

File tree

1 file changed

+92
-14
lines changed

1 file changed

+92
-14
lines changed

.circleci/config.yml

Lines changed: 92 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,97 @@
11
version: 2
2+
3+
defaults: &defaults
4+
working_directory: /tmp/project
5+
docker:
6+
- image: walberla/buildenv-ubuntu-clang:4.0
7+
environment:
8+
CIRCLE_BUILD_IMAGE: ubuntu
9+
ATOM_CHANNEL: stable
10+
DISPLAY: :99
11+
212
jobs:
3-
build:
4-
working_directory: ~/linter-clang
5-
docker:
6-
- image: walberla/buildenv-ubuntu-clang:4.0
7-
environment:
8-
DISPLAY: ":99"
13+
checkout_code:
14+
<<: *defaults
915
steps:
10-
- run: apt-get update
16+
- checkout
17+
- run:
18+
name: Download Atom test script
19+
command: curl -s -O https://raw.githubusercontent.com/atom/ci/master/build-package.sh
20+
- run:
21+
name: Make Atom script executable
22+
command: chmod u+x build-package.sh
23+
# Restore node_modules from the last build
24+
- restore_cache:
25+
keys:
26+
# Get latest cache for this package.json
27+
- v2-dependencies-{{ checksum "package.json" }}
28+
# Fallback to the last available cache
29+
- v2-dependencies
30+
# Save project state for next steps
31+
- persist_to_workspace:
32+
root: /tmp
33+
paths:
34+
- project
35+
36+
stable:
37+
<<: *defaults
38+
steps:
39+
# Restore project state
40+
- attach_workspace:
41+
at: /tmp
42+
- run:
43+
name: Update APT
44+
command: apt-get update
1145
# Install some pre-requisite packages and missing dependencies from the atom package
12-
- run: apt-get --assume-yes --quiet --no-install-suggests --no-install-recommends install sudo xvfb libxss1 libasound2
46+
- run:
47+
name: Atom Prerequisites
48+
command: apt-get --assume-yes --quiet --no-install-suggests --no-install-recommends install sudo xvfb libxss1 libasound2
1349
# Fire up a VFB to run Atom in
14-
- run: /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
15-
- checkout
16-
# Download and run the (modified) Atom CI script
17-
- run: curl -s -O https://raw.githubusercontent.com/Arcanemagus/ci/atomlinter/build-package.sh
18-
- run: chmod u+x build-package.sh
19-
- run: ./build-package.sh
50+
- run:
51+
name: Create VFB for Atom to run in
52+
command: /usr/bin/Xvfb $DISPLAY -ac -screen 0 1280x1024x16
53+
background: true
54+
- run:
55+
name: Atom test
56+
command: ./build-package.sh
57+
# Cache node_modules
58+
- save_cache:
59+
paths:
60+
- node_modules
61+
key: v2-dependencies-{{ checksum "package.json" }}
62+
63+
beta:
64+
<<: *defaults
65+
environment:
66+
ATOM_CHANNEL: beta
67+
steps:
68+
# Restore project state
69+
- attach_workspace:
70+
at: /tmp
71+
- run:
72+
name: Update APT
73+
command: apt-get update
74+
# Install some pre-requisite packages and missing dependencies from the atom package
75+
- run:
76+
name: Atom Prerequisites
77+
command: apt-get --assume-yes --quiet --no-install-suggests --no-install-recommends install sudo xvfb libxss1 libasound2
78+
# Fire up a VFB to run Atom in
79+
- run:
80+
name: Create VFB for Atom to run in
81+
command: /usr/bin/Xvfb $DISPLAY -ac -screen 0 1280x1024x16
82+
background: true
83+
- run:
84+
name: Atom test
85+
command: ./build-package.sh
86+
87+
workflows:
88+
version: 2
89+
test_package:
90+
jobs:
91+
- checkout_code
92+
- stable:
93+
requires:
94+
- checkout_code
95+
- beta:
96+
requires:
97+
- checkout_code

0 commit comments

Comments
 (0)