Skip to content

Commit

Permalink
Trying to add macos releases
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Nov 13, 2018
1 parent 6e351b7 commit 549eed5
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 6 deletions.
51 changes: 45 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- checkout
- restore_cache:
keys:
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
- v4-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
- run: sudo apt-get install -y cmake
- run: rustup default nightly-2018-10-07
- run: make test
Expand All @@ -29,14 +29,51 @@ jobs:
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
- target/release/.fingerprint
- target/release/build
- target/release/deps
key: v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
key: v4-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}

# create-release-artifacts-mac:
# macos:
# xcode: "9.0"
# - checkout
build-macos:
macos:
xcode: "9.0"

steps:
- checkout
- restore_cache:
keys:
- v4-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Install CMAKE
command: |
wget https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz
tar xf cmake-3.4.1-Darwin-x86_64.tar.gz
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
- run:
name: Install Rust Nightly
command: curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly-2018-10-07
- run: make test
- run:
command: |
make release
mkdir -p artifacts
VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
echo "${VERSION}" >> artifacts/version
cp ./target/release/wasmer ./artifacts/$(./binary-name.sh)
- persist_to_workspace:
root: .
paths:
- artifacts
- save_cache:
paths:
- /usr/local/cargo/registry
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
- target/release/.fingerprint
- target/release/build
- target/release/deps
key: v4-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}

publish-github-release:
docker:
Expand All @@ -60,6 +97,7 @@ workflows:
main:
jobs:
- build
- build-macos
# :
# filters:
# tags:
Expand All @@ -68,6 +106,7 @@ workflows:
- publish-github-release:
requires:
- build
- build-macos
# filters:
# branches:
# ignore: /.*/
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
**/*.rs.bk
/artifacts

0 comments on commit 549eed5

Please sign in to comment.