-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
615ae56
commit afb08bb
Showing
1 changed file
with
45 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,30 +6,23 @@ on: | |
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: [x64] | ||
os: [ubuntu-22.04] | ||
python-version: ["3.12"] | ||
name: build - python ${{ matrix.python-version }} (${{ matrix.arch }} ${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
|
||
# env: | ||
# # > -------------------------------------------------- | ||
# # > sccache | ||
# # https://github.com/Mozilla-Actions/sccache-action | ||
# SCCACHE_IDLE_TIMEOUT: 0 | ||
# SCCACHE_DIRECT: "true" | ||
# SCCACHE_CACHE_MULTIARCH: 1 | ||
# SCCACHE_DIR: ${{ github.workspace }}/.cache/sccache | ||
# RUSTC_WRAPPER: "sccache" | ||
# CC: "sccache clang" | ||
# CXX: "sccache clang++" | ||
# # Incrementally compiled crates cannot be cached by sccache | ||
# # https://github.com/mozilla/sccache#rust | ||
# CARGO_INCREMENTAL: 0 | ||
# # > -------------------------------------------------- | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 120 | ||
env: | ||
# > -------------------------------------------------- | ||
# > sccache | ||
# https://github.com/Mozilla-Actions/sccache-action | ||
SCCACHE_IDLE_TIMEOUT: 0 | ||
SCCACHE_DIRECT: "true" | ||
SCCACHE_CACHE_MULTIARCH: 1 | ||
SCCACHE_DIR: ${{ github.workspace }}/.cache/sccache | ||
RUSTC_WRAPPER: "sccache" | ||
CC: "sccache clang" | ||
CXX: "sccache clang++" | ||
# Incrementally compiled crates cannot be cached by sccache | ||
# https://github.com/mozilla/sccache#rust | ||
CARGO_INCREMENTAL: 0 | ||
# > -------------------------------------------------- | ||
|
||
services: | ||
redis: | ||
|
@@ -52,16 +45,16 @@ jobs: | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
steps: | ||
- name: Free disk space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
tool-cache: true | ||
android: false | ||
dotnet: false | ||
haskell: false | ||
large-packages: true | ||
docker-images: true | ||
swap-storage: true | ||
# - name: Free disk space # Continue to monitor | ||
# uses: jlumbroso/free-disk-space@main | ||
# with: | ||
# tool-cache: true | ||
# android: false | ||
# dotnet: false | ||
# haskell: false | ||
# large-packages: true | ||
# docker-images: true | ||
# swap-storage: true | ||
|
||
- name: Install runner dependencies | ||
run: sudo apt-get install -y curl clang git libssl-dev make pkg-config | ||
|
@@ -76,7 +69,7 @@ jobs: | |
- name: Set up Python environment | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
python-version: "3.12" | ||
|
||
- name: Get Python version | ||
run: | | ||
|
@@ -96,19 +89,19 @@ jobs: | |
- name: Install build dependencies | ||
run: python -m pip install --upgrade pip setuptools wheel pre-commit msgspec | ||
|
||
# - name: Cached sccache | ||
# id: cached-sccache | ||
# uses: actions/[email protected] | ||
# with: | ||
# path: ${{ env.SCCACHE_DIR }} | ||
# key: sccache-${{ runner.os }}-${{ github.workflow }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock', '**/poetry.lock') }} | ||
# restore-keys: | | ||
# sccache-${{ runner.os }}-${{ github.workflow }}-${{ github.job }}- | ||
# sccache-${{ runner.os }}-${{ github.workflow }}- | ||
# sccache-${{ runner.os }}- | ||
# | ||
# - name: Run sccache | ||
# uses: mozilla-actions/[email protected] | ||
- name: Cached sccache | ||
id: cached-sccache | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{ env.SCCACHE_DIR }} | ||
key: sccache-${{ runner.os }}-${{ github.workflow }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock', '**/poetry.lock') }} | ||
restore-keys: | | ||
sccache-${{ runner.os }}-${{ github.workflow }}-${{ github.job }}- | ||
sccache-${{ runner.os }}-${{ github.workflow }}- | ||
sccache-${{ runner.os }}- | ||
- name: Run sccache | ||
uses: mozilla-actions/[email protected] | ||
|
||
- name: Set poetry cache-dir | ||
run: echo "POETRY_CACHE_DIR=$(poetry config cache-dir)" >> $GITHUB_ENV | ||
|
@@ -140,7 +133,10 @@ jobs: | |
POSTGRES_DATABASE: nautilus | ||
|
||
- name: Run tests with coverage | ||
run: make pytest-coverage | ||
run: | | ||
while sleep 60; do echo "Tests are still running..."; done & | ||
make pytest-coverage | ||
kill %1 | ||
- name: Upload coverage report | ||
uses: codecov/codecov-action@v4 | ||
|