Skip to content

disable refresh on record #5397

disable refresh on record

disable refresh on record #5397

Workflow file for this run

name: main
on:
push:
branches:
- 'main'
- 'swift-toolbox-v4.0.0-branch'
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
- 'v[0-9]+.[0-9]+.[0-9]+*'
pull_request:
env:
PIP_CACHE_DIR: ~/.cache/pip
RUST_CACHE_DIRS: "~/.cargo/registry\n~/.cargo/git\ntarget\n"
LIBCLANG_PATH_WIN: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/Llvm/x64/bin"
CODE_SIGNER_PATH_WIN: "%win10sdk%/x64/signtool.exe"
CARGO_MAKE_VERSION: 0.35.10
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"
APP_NAME: swift-console
APP_BUNDLE_ID: com.swift-nav.SwiftConsole
jobs:
backend_bench:
name: Backend Benchmarks
strategy:
matrix:
os:
- ubuntu-20.04
- macos-11
- 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 update && sudo apt-get install -y capnproto libudev-dev libssl-dev
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install capnp llvm
elif [ "$RUNNER_OS" == "Windows" ]; then
choco install -y capnproto
echo "LIBCLANG_PATH=${{ env.LIBCLANG_PATH_WIN }}" >> $GITHUB_ENV
fi
- name: Pull Git LFS objects
run: git lfs pull
env:
GIT_SSH_COMMAND: ssh -o StrictHostKeyChecking=no
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: Swatinem/rust-cache@v1
with:
key: ${{ secrets.CACHE_VERSION }}
- uses: davidB/rust-cargo-make@v1
with:
version: ${{ env.CARGO_MAKE_VERSION }}
- name: Cache pip
uses: actions/cache@v2
with:
path: ${{ env.PIP_CACHE_DIR }}
key: ${{ runner.os }}-pyproject-toml-${{ secrets.CACHE_VERSION }}-${{ hashFiles('pyproject.toml') }}
- name: Install ImageMagick
shell: bash
run: cargo make install-imagemagick
- name: Set up python builder
shell: bash
run: cargo make setup-builder
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Backend Benchmarks
run: cargo make backend-benches
checks:
name: Code Quality Checks
runs-on: ubuntu-20.04
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: 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
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
with:
key: ${{ secrets.CACHE_VERSION }}
- uses: davidB/rust-cargo-make@v1
with:
version: ${{ env.CARGO_MAKE_VERSION }}
- name: Install Dependencies.
run: sudo apt-get update && sudo apt-get install -y capnproto libudev-dev libssl-dev
- name: Cache pip
uses: actions/cache@v2
with:
path: ${{ env.PIP_CACHE_DIR }}
key: ${{ runner.os }}-pyproject-toml-${{ secrets.CACHE_VERSION }}-${{ hashFiles('pyproject.toml') }}
- name: Install ImageMagick
shell: bash
run: cargo make install-imagemagick
- name: Set up python builder
run: cargo make setup-builder
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Checks
run: cargo make check-all
- name: Run Tests
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 3
retry_on: error
command: cargo make tests
frontend_distribute:
name: Run frontend benchmarks, build, sign and distribute
needs: [checks, backend_bench]
runs-on: ubuntu-latest
steps:
- shell: bash
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
run: echo "SHOULD_RELEASE=true" >> $GITHUB_ENV
- shell: bash
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
- uses: convictional/[email protected]
with:
owner: swift-nav
repo: swift-toolbox-ci
ref: swift-toolbox-v4.0.0-branch
workflow_file_name: distribute.yml
client_payload: '{
"branch": "${{ github.head_ref || github.ref_name }}",
"run_id": "${{ github.run_id }}",
"should_release": "${{ env.SHOULD_RELEASE || false}}",
"version": "${{ env.VERSION }}",
"pr_number": "${{ github.event.number }}"
}'
github_user: ${{ secrets.GH_NAME }}
github_token: ${{ secrets.GH_TOKEN }}
propagate_failure: true
wait_workflow: true
trigger_workflow: true
wait_interval: 120