diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index d0b0a043..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,54 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: ubuntu:18.04 - environment: - DEBUG_BUILD: true - DEBIAN_FRONTEND: noninteractive - - working_directory: ~/edgeware - - steps: - # basic image config to install sudo, node, yarn - - run: apt-get update - - run: apt-get install -y sudo git curl - - run: curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - - - run: sudo apt-get install -y nodejs - - run: npm install --global yarn - - # begin using repo-specific scripts - - checkout - - run: ~/edgeware/scripts/init.sh - - # get cached edgeware build - - restore_cache: - key: edgeware-{{ checksum "Cargo.lock" }} - - # module test cases - - run: source ~/.cargo/env && cd ~/edgeware && ./scripts/test.sh - - # full build - - run: source ~/.cargo/env && cd ~/edgeware && cargo build --release - - # save the built binary - - store_artifacts: - path: ~/edgeware/target/release/edgeware - destination: edgeware-node - - # save edgeware build - - save_cache: - key: edgeware-{{ checksum "Cargo.lock" }} - paths: - - target - - # ts test cases with node_modules caching - - restore_cache: - key: edgeware-tests-{{ checksum "ts-tests/frontier-tester/yarn.lock" }} - - run: cd ~/edgeware/ts-tests/frontier-tester && yarn - - save_cache: - key: edgeware-tests-{{ checksum "ts-tests/frontier-tester/yarn.lock" }} - paths: - - ts-tests/frontier-tester/node_modules - - - run: cd ~/edgeware/ts-tests/frontier-tester && yarn test-ci diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..f631eeae --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: Build +on: [push] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Install Rust stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Install Rust nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + default: true + + - name: Install wasm32 + uses: actions-rs/toolchain@v1 + with: + target: wasm32-unknown-unknown + toolchain: nightly + + - uses: actions/cache@v2 + with: + path: target/ + key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-rust- + + - name: Module tests + run: ./scripts/test.sh + + - name: Build binary + run: cargo build --release + + - name: Save binary + uses: actions/upload-artifact@v2 + with: + name: edgeware + path: target/release/edgeware diff --git a/.gitignore b/.gitignore index 476390e9..100ad7ff 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,5 @@ db node_modules forker-data beresheet-state.json -build \ No newline at end of file +build +*yalc* \ No newline at end of file