Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
src/main/fbs/* linguist-vendored
src/main/nuitka/* linguist-vendored
console_backend/benches/data/**/**/*.sbp filter=lfs diff=lfs merge=lfs -text
131 changes: 95 additions & 36 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,90 @@ on:
pull_request:

jobs:

backend_bench:

name: Backend Benchmarks

strategy:
matrix:
os:
- ubuntu-20.04
- macos-10.15
- windows-2019

runs-on: ${{ matrix.os }}

steps:

- name: Checkout source
uses: actions/checkout@v2
with:
submodules: recursive
ssh-key: ${{ secrets.SSH_KEY }}
ssh-strict: false

- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_KEY }}

- name: Run ssh-keyscan
run: ssh-keyscan github.com >> ~/.ssh/known_hosts

- name: Setup SSH for Windows Git LFS
run: |
& "C:\\Program Files\\Git\\bin\\sh.exe" -c "ssh-keyscan github.com >> ~/.ssh/known_hosts"
& "C:\\Program Files\\Git\\bin\\sh.exe" -c "echo '${{ secrets.SSH_KEY }}' >> ~/.ssh/id_rsa"
if: matrix.os == 'windows-2019'

- name: Install ${{ runner.os }} Dependencies.
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y capnproto git-lfs
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install capnp git-lfs
elif [ "$RUNNER_OS" == "Windows" ]; then
choco install -y capnproto git-lfs
fi

- name: Pull Git LFS objects
run: git lfs pull
env:
GIT_SSH_COMMAND: ssh -o StrictHostKeyChecking=no

- name: Install stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- uses: davidB/rust-cargo-make@v1
with:
version: '0.32.11'

- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: console_pp
environment-file: conda.yml

- name: Poetry Install
run: |
conda run -n console_pp poetry install

- name: Run Benchmarks
shell: bash
run: |
cargo make benches

checks:

name: Code Quality Checks

runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}

steps:

- name: Checkout source
uses: actions/checkout@v2
with:
Expand All @@ -27,67 +105,57 @@ jobs:
toolchain: stable
override: true
components: rustfmt, clippy

- uses: davidB/rust-cargo-make@v1
with:
version: '0.32.11'
- name: Cache conda
uses: actions/cache@v1
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda.yml') }}

- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: console_pp
environment-file: conda.yml
use-only-tar-bz2: true

- name: Install Dependencies.
run: |
sudo apt-get install -y capnproto
shell: bash

- name: Poetry Install
run: |
conda activate console_pp
python -m poetry install
conda run -n console_pp poetry install

- name: Run Format Check
run: |
conda activate console_pp
cargo make format-check

- name: Run Type Check
run: |
conda activate console_pp
cargo make types

- name: Run Lint Check
run: |
conda activate console_pp
cargo make lint

- name: Run Tests
run: |
conda activate console_pp
cargo make tests

build:

name: Build Binaries

needs:
- checks
- backend_bench

strategy:
matrix:
os:
- ubuntu-20.04
- macos-10.15
- windows-2019

runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}

steps:

- name: Checkout source
Expand All @@ -97,6 +165,7 @@ jobs:
ssh-key: ${{ secrets.SSH_KEY }}

- name: Install ${{ runner.os }} Dependencies.
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y capnproto ruby ruby-dev rubygems build-essential
Expand All @@ -113,35 +182,25 @@ jobs:
toolchain: stable
override: true
components: rustfmt, clippy

- uses: davidB/rust-cargo-make@v1
with:
version: '0.32.11'

- name: Cache conda
uses: actions/cache@v1
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: console_pp
environment-file: conda.yml
use-only-tar-bz2: true

- name: Poetry Install
run: |
conda activate console_pp
python -m poetry install
conda run -n console_pp poetry install

- name: Build ${{ runner.os }} Binaries.
env:
OS_NAME: ${{ runner.os }}
shell: bash
run: |
conda activate console_pp
cargo make prod-installer
bash ./.github/ci-build.sh
echo "RELEASE_ARCHIVE=$(cat release-archive.filename)" >>$GITHUB_ENV
Expand Down
Loading