Skip to content

Commit

Permalink
Update circleci instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
savannidgerinel committed Feb 9, 2020
1 parent fb12699 commit 2871cb1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 65 deletions.
73 changes: 12 additions & 61 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,84 +1,35 @@
version: 2
jobs:
build-nixos:
build:
working_directory: ~/repo
parallelism: 1

docker:
- image: savannidgerinel/nixos-rust
- image: circleci/rust:1.39

steps:
- checkout

- restore_cache:
key: rust-nixos-{{ checksum "server/Cargo.lock" }}

- run:
name: update the build channel
command: |
nix-channel --add https://nixos.org/channels/nixos-19.03 nixpkgs-19.03
nix-channel --update
keys:
- dep-{{ checksum "Cargo.toml" }}

- run:
name: build
command: |
nix-build
- save_cache:
key: rust-nixos-{{ checksum "server/Cargo.lock" }}
paths:
- "/nix/store"

build-ubuntu:
working_directory: ~/repo
parallelism: 1

docker:
- image: circleci/rust:1.33-node

steps:
- checkout

- restore_cache:
keys:
- dep-ubuntu-{{ checksum "server/Cargo.toml" }}
command: cargo build --release

- run:
name: build server
command: cd server && cargo build --release
name: test fitnesstrax-lib
command: |
cd fitnesstrax-lib
RUST_BACKTRACE=1 cargo test
- run:
name: test server
name: test the GTK app
command: |
cd server
mkdir var
RUST_BACKTRACE=1 cargo test
- save_cache:
key: dep-ubuntu-{{ checksum "server/Cargo.toml" }}
paths:
- ~/.cargo

- restore_cache:
keys:
- dep-{{ checksum "client/package-lock.json" }}

- run:
name: install javascript dependencies
command: cd client && npm install

- run:
name: build the client
command: cd client && npm run build

- run:
name: test the client
command: cd client && npm run test

- save_cache:
key: dep-{{ checksum "client/package-lock.json" }}
paths:
- client/node_modules

#- run:
#name: copy components
#command: |
Expand All @@ -95,4 +46,4 @@ workflows:
version: 2
build_ubuntu:
jobs:
- build-ubuntu
- build
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fitnesstrax-lib/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2871cb1

Please sign in to comment.