91 lines
4.1 KiB
YAML
91 lines
4.1 KiB
YAML
|
name: Build Release Suite
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- stable
|
||
|
tags:
|
||
|
- v2*
|
||
|
|
||
|
jobs:
|
||
|
build:
|
||
|
name: Build Release
|
||
|
strategy:
|
||
|
matrix:
|
||
|
platform:
|
||
|
- ubuntu-16.04
|
||
|
- macos-latest
|
||
|
- windows-latest
|
||
|
toolchain:
|
||
|
- stable
|
||
|
runs-on: ${{ matrix.platform }}
|
||
|
steps:
|
||
|
- name: Checkout sources
|
||
|
uses: actions/checkout@v2
|
||
|
with:
|
||
|
fetch-depth: 50
|
||
|
- name: Install toolchain
|
||
|
uses: actions-rs/toolchain@v1
|
||
|
with:
|
||
|
toolchain: ${{ matrix.toolchain }}
|
||
|
profile: minimal
|
||
|
override: true
|
||
|
- name: Cache cargo registry
|
||
|
uses: actions/cache@v1.1.2
|
||
|
with:
|
||
|
path: ~/.cargo/registry
|
||
|
key: ${{ runner.os }}-cargo-registry-build-${{ hashFiles('**/Cargo.lock') }}
|
||
|
- name: Cache cargo index
|
||
|
uses: actions/cache@v1.1.2
|
||
|
with:
|
||
|
path: ~/.cargo/git
|
||
|
key: ${{ runner.os }}-cargo-git-build-${{ hashFiles('**/Cargo.lock') }}
|
||
|
- name: Cache cargo build
|
||
|
uses: actions/cache@v1.1.2
|
||
|
with:
|
||
|
path: target
|
||
|
key: ${{ runner.os }}-cargo-build-target-build-${{ hashFiles('**/Cargo.lock') }}
|
||
|
- name: Cache sccache linux
|
||
|
if: matrix.platform == 'ubuntu-16.04'
|
||
|
uses: actions/cache@v1.1.2
|
||
|
with:
|
||
|
path: "/home/runner/.cache/sccache"
|
||
|
key: ${{ runner.os }}-sccache-build-${{ hashFiles('**/Cargo.lock') }}
|
||
|
- name: Cache sccache MacOS
|
||
|
if: matrix.platform == 'macos-latest'
|
||
|
uses: actions/cache@v1.1.2
|
||
|
with:
|
||
|
path: "/Users/runner/Library/Caches/Mozilla.sccache"
|
||
|
key: ${{ runner.os }}-sccache-build-${{ hashFiles('**/Cargo.lock') }}
|
||
|
- name: Cache sccache Windows
|
||
|
if: matrix.platform == 'windows-latest'
|
||
|
uses: actions/cache@v1.1.2
|
||
|
with:
|
||
|
path: "C:\\Users\\runneradmin\\AppData\\Local\\Mozilla\\sccache\\cache"
|
||
|
key: ${{ runner.os }}-sccache-build-${{ hashFiles('**/Cargo.lock') }}
|
||
|
- name: Install sccache for ${{ matrix.platform }}
|
||
|
shell: pwsh
|
||
|
run: pwsh scripts/actions/install-sccache.ps1 ${{ runner.os}}
|
||
|
- name: Install LLVM for Windows
|
||
|
if: matrix.platform == 'windows-latest'
|
||
|
run: choco install llvm
|
||
|
- name: Sccache statistics
|
||
|
run: sccache --show-stats
|
||
|
- name: Build OpenEthereum for windows
|
||
|
if: matrix.platform == 'windows-latest'
|
||
|
run: sh scripts/actions/build-windows.sh ${{matrix.platform}}
|
||
|
- name: Build OpenEthereum for ${{matrix.platform}}
|
||
|
if: matrix.platform != 'windows-latest'
|
||
|
run: sh scripts/actions/build-linux.sh ${{matrix.platform}}
|
||
|
- name: Stop sccache
|
||
|
if: always()
|
||
|
run: sccache --stop-server
|
||
|
- name: Download artifact
|
||
|
uses: actions/upload-artifact@v1
|
||
|
with:
|
||
|
name: ${{matrix.platform}}.artifacts.zip
|
||
|
path: artifacts/
|
||
|
- name: Prepare build directory for cache
|
||
|
shell: bash
|
||
|
run: bash scripts/actions/clean-target.sh
|