This probably says it all
version: 2
#update only
jobs:
# build:
# docker:
# - image: "debian:stretch"
# steps:
# - checkout
# - run:
# name: Installing SUDO
# command: 'apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/*'
# - run:
# name: Install buildchain
# command: 'apt-get update && sudo apt-get install -y build-essential'
# - run:
# name: Install GL toolchain
# command: 'apt-get update && sudo apt-get install -y freeglut3 libglew1.5-dev freeglut3-dev libglew1.5 libglu1-mesa libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev'
# - run:
# name: build
# command: 'make all'
build:
macos: # indicate that we are using the macOS executor
xcode: "10.0.0" # indicate our selected version of Xcode
steps: # a series of commands to run
- checkout
- run:
name: Install brew MacOS
command: '/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"'
- run:
name: Install GL toolchain MacOS
command: 'brew install glew'
- run:
name: build-macos
command: 'make all'
Why cant we have both?
Now that the macos build issues have been resolved (we were hitting a nasty timeout issue) You can build two targets.
It may help if you use the short hand calls… for example here is a short hand call for docker and macos executors (xcode 10.3.0)
# Short-hand
defaults: &defaults
working_directory: ~/react-native
docker:
- image: circleci/node:10.16.0
e2e_env: &e2e_env
working_directory: ~/react-native
macos:
xcode: "10.3.0"
shell: /bin/bash --login -eo pipefail
Then under each job you can specify which executor you want it to use
such as:
jobs:
checkout_code:
<<: *defaults
e2e_setup:
<<: *e2e_env
marc
September 16, 2019, 2:53pm
3
Hi John,
I would use 2.1
config and executors
for this:
version: 2.1
executors:
test_macos:
macos:
xcode: 11.0.0
test_linux:
docker:
- image: circleci/node:10.16.0
jobs:
test:
parameters:
executor:
type: executor
executor: << parameters.executor >>
steps:
- checkout
- run: bash -version # Show bash version
- run: echo $0 # Show current shell
workflows:
workflow:
jobs:
- test:
executor: test_macos
- test:
executor: test_linux
Running circleci config process
on this produces:
version: 2
jobs:
test-1:
macos:
xcode: 11.0.0
steps:
- checkout
- run:
command: bash -version
- run:
command: echo $0
test-2:
docker:
- image: circleci/node:10.16.0
steps:
- checkout
- run:
command: bash -version
- run:
command: echo $0
workflows:
workflow:
jobs:
- test-1
- test-2
version: 2
Using both executors like this could you persist data from the macos executor into the docker one?
building the app file with macos executor and then trying to persist over to docker executor to launch tests against docker stood up mysql / redis / api images