Skip to content

Instantly share code, notes, and snippets.

@jamwaffles
Created October 31, 2020 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamwaffles/8ab8c34f81bbafe7b64739b1d7a07aa9 to your computer and use it in GitHub Desktop.
Save jamwaffles/8ab8c34f81bbafe7b64739b1d7a07aa9 to your computer and use it in GitHub Desktop.
linux_steps: &linux_steps
docker:
- image: cimg/rust:1.47.0
steps:
- checkout
- restore_cache:
keys:
- v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cargo.lock" }}
- run: ./linux_build_script_1_here.sh
- run: ./linux_build_script_2_here.sh
- save_cache:
key: v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cargo.lock" }}
paths:
- ./target
- /home/circleci/.cargo/registry
macos_steps: &macos_steps
docker:
- image: cimg/rust:1.47.0
steps:
- checkout
- restore_cache:
keys:
- v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cargo.lock" }}
- run: ./mac_build_script_1_here.sh
- run: ./mac_build_script_2_here.sh
- save_cache:
key: v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cargo.lock" }}
paths:
- ./target
- /home/circleci/.cargo/registry
jobs:
build-linux:
<<: *linux_steps
build-macos:
<<: *macos_steps
workflows:
version: 2
build_all:
jobs:
- build-linux
- build-macos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment