Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Setting up the Windows CI #198

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
371cd00
Enabled the coverage and release on windows
rahulbansal16 Jan 20, 2021
9a6fc1a
commented ubuntu for testing
rahulbansal16 Jan 20, 2021
4345784
Merge branch 'master' into rabans/cli/win
rahulbansal16 Jan 20, 2021
5969e04
separated the Z3 and boost stp
rahulbansal16 Jan 20, 2021
3000450
added version
rahulbansal16 Jan 20, 2021
71059f4
commented coverage
rahulbansal16 Jan 20, 2021
df2e4e9
removed z3
rahulbansal16 Jan 20, 2021
af5f10f
commented wasm test
rahulbansal16 Jan 20, 2021
b15595a
commented lint
rahulbansal16 Jan 20, 2021
2264350
commented extra seteps
rahulbansal16 Jan 20, 2021
a9b880e
configuring cmake
rahulbansal16 Jan 20, 2021
3fc0ae7
setting the env
rahulbansal16 Jan 20, 2021
b98d903
updating the env
rahulbansal16 Jan 20, 2021
c875167
Fixing the Boost and Cmake different version
rahulbansal16 Jan 20, 2021
9e3adea
added missing env
rahulbansal16 Jan 20, 2021
1237b1c
downgraded the boost version
rahulbansal16 Jan 20, 2021
d4e0ce8
downgrading the boost version
rahulbansal16 Jan 20, 2021
0ecc373
changed to 69
rahulbansal16 Jan 20, 2021
a87be52
added Z3
rahulbansal16 Jan 20, 2021
eebfc3e
updated the version
rahulbansal16 Jan 20, 2021
0e6b4d9
trying the vc142 and 1.73.0
rahulbansal16 Jan 21, 2021
5e980d3
adding D before flag
rahulbansal16 Jan 21, 2021
58b45b7
checking with 72
rahulbansal16 Jan 21, 2021
f8f7e71
added toolset version
rahulbansal16 Jan 21, 2021
f59b42b
Setting the boost env to override
rahulbansal16 Jan 21, 2021
c733b81
set the boost_ver
rahulbansal16 Jan 21, 2021
5c87452
removed compiler overrider
rahulbansal16 Jan 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 98 additions & 77 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,79 +14,82 @@ env:

jobs:

coverage:
# coverage:

runs-on: ubuntu-latest
# runs-on:
# - ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Cache Rust dependencies
uses: actions/[email protected]
with:
# There's a problem with caching serde, hence we exclude it here
path: |
target
!target/**/*serde*
key: ${{ runner.OS }}-build-v2-${{ hashFiles('**/Cargo.lock') }}
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: coverage with tarpaulin
run: |
cargo install cargo-tarpaulin
make coverage
bash <(curl -s https://codecov.io/bash)
# steps:
# - uses: actions/checkout@v2
# - name: Cache Rust dependencies
# uses: actions/[email protected]
# with:
# # There's a problem with caching serde, hence we exclude it here
# path: |
# target
# !target/**/*serde*
# key: ${{ runner.OS }}-build-v2-${{ hashFiles('**/Cargo.lock') }}
# - name: Install latest nightly
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: nightly
# override: true
# - name: coverage with tarpaulin
# run: |
# cargo install cargo-tarpaulin
# make coverage
# bash <(curl -s https://codecov.io/bash)

lint:
runs-on: ubuntu-latest
steps:
- name: Install system dependencies
run: |
sudo apt-get install -y libboost-all-dev
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 50
sudo update-alternatives --set g++ "/usr/bin/g++-8"
- uses: actions/checkout@v2
- name: Cache Rust dependencies
uses: actions/[email protected]
with:
# There's a problem with caching serde, hence we exclude it here
path: |
target
!target/**/*serde*
key: ${{ runner.OS }}-build-v2-${{ hashFiles('**/Cargo.lock') }}
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy
- name: Validate release notes entry
run: ./newsfragments/validate_files.py
- name: Lint with rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Build
run: cargo build --all-features --verbose
- name: Lint with clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- -D warnings
# lint:
# runs-on: ubuntu-latest
# steps:
# - name: Install system dependencies
# run: |
# sudo apt-get install -y libboost-all-dev
# sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 50
# sudo update-alternatives --set g++ "/usr/bin/g++-8"
# - uses: actions/checkout@v2
# - name: Cache Rust dependencies
# uses: actions/[email protected]
# with:
# # There's a problem with caching serde, hence we exclude it here
# path: |
# target
# !target/**/*serde*
# key: ${{ runner.OS }}-build-v2-${{ hashFiles('**/Cargo.lock') }}
# - name: Install latest nightly
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: nightly
# override: true
# components: rustfmt, clippy
# - name: Validate release notes entry
# run: ./newsfragments/validate_files.py
# - name: Lint with rustfmt
# uses: actions-rs/cargo@v1
# with:
# command: fmt
# args: --all -- --check
# - name: Build
# run: cargo build --all-features --verbose
# - name: Lint with clippy
# uses: actions-rs/cargo@v1
# with:
# command: clippy
# args: --all-targets --all-features -- -D warnings

test:
# Build & Test runs on all platforms
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
- os: macOS-latest
# - os: ubuntu-latest
# - os: macOS-latest
- os: windows-latest

steps:
- uses: actions/checkout@v2
- name: Cache Rust dependencies
Expand All @@ -107,6 +110,17 @@ jobs:
sudo apt-get install -y libboost-all-dev
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 50
sudo update-alternatives --set g++ "/usr/bin/g++-8"
- name: Install Z3
if: startsWith(matrix.os, 'win')
uses: pavpanchekha/[email protected]
- name: Install Boost
if: startsWith(matrix.os, 'win')
uses: MarkusJx/[email protected]
id: install-boost
with:
boost_version: 1.73.0
toolset: msvc14.1

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
Expand All @@ -115,29 +129,36 @@ jobs:
override: true
- name: Build
run: cargo build --all-features --verbose
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
BOOST_VER: ${{ steps.install-boost.outputs.BOOST_VER}}
- name: Run tests
run: cargo test --workspace --features solc-backend --verbose
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
Boost_NO_BOOST_CMAKE: ON

wasm-test:
runs-on: ubuntu-latest
container: davesque/rust-wasm
steps:
- uses: actions/checkout@v2
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Run WASM tests
run: wasm-pack test --node -- --workspace

# wasm-test:
# runs-on: ubuntu-latest
# container: davesque/rust-wasm
# steps:
# - uses: actions/checkout@v2
# - name: Install latest nightly
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: nightly
# override: true
# - name: Run WASM tests
# run: wasm-pack test --node -- --workspace


release:
# Only run this when we push a tag
if: startsWith(github.ref, 'refs/tags/')
runs-on: ${{ matrix.os }}
needs: [lint, test, wasm-test]
needs: [test]
strategy:
matrix:
include:
Expand Down