Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
ada76b0153
|
|||
|
15ded3a5bd
|
|||
|
7befa882d5
|
|||
|
d03fae960a
|
|||
|
7b2235d56b
|
|||
|
54f9f3dc36
|
@@ -2,11 +2,21 @@ name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ['**']
|
||||
tags: ['v*']
|
||||
branches: ["**"]
|
||||
tags: ["v*"]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
CARGO_INCREMENTAL: "0"
|
||||
RUSTC_WRAPPER: sccache
|
||||
SCCACHE_BUCKET: sccache
|
||||
SCCACHE_ENDPOINT: http://caveman.kosherinata.internal:9000
|
||||
SCCACHE_REGION: auto
|
||||
SCCACHE_S3_USE_SSL: "false"
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.SCCACHE_S3_ACCESS_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_S3_SECRET_KEY }}
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: Format, lint, build, test
|
||||
@@ -14,18 +24,41 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Cache cargo registry and target
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin
|
||||
~/.cargo/registry/index
|
||||
~/.cargo/registry/cache
|
||||
~/.cargo/git/db
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-
|
||||
|
||||
- name: Ensure sccache with S3 support
|
||||
env:
|
||||
RUSTC_WRAPPER: ""
|
||||
run: |
|
||||
if sccache --version 2>/dev/null && sccache --show-stats 2>/dev/null; then
|
||||
echo "sccache with S3 support already installed"
|
||||
else
|
||||
cargo install sccache --features s3 --locked
|
||||
fi
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt --check --all
|
||||
|
||||
- name: Clippy
|
||||
run: cargo clippy --workspace -- -D warnings
|
||||
|
||||
- name: Build
|
||||
run: cargo build --workspace
|
||||
|
||||
- name: Test
|
||||
run: cargo test --workspace
|
||||
|
||||
- name: Show sccache stats
|
||||
run: sccache --show-stats
|
||||
|
||||
srpm-cortex:
|
||||
name: Build cortex SRPM
|
||||
runs-on: fedora
|
||||
@@ -76,7 +109,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: srpm-cortex
|
||||
path: '*.src.rpm'
|
||||
path: "*.src.rpm"
|
||||
|
||||
srpm-neuron:
|
||||
name: Build neuron SRPM
|
||||
@@ -128,7 +161,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: srpm-neuron
|
||||
path: '*.src.rpm'
|
||||
path: "*.src.rpm"
|
||||
|
||||
copr-cortex:
|
||||
name: Publish cortex to COPR
|
||||
|
||||
@@ -13,6 +13,10 @@ ExclusiveArch: x86_64
|
||||
BuildRequires: rust >= 1.85
|
||||
BuildRequires: cargo
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: systemd-rpm-macros
|
||||
|
||||
Requires(pre): shadow-utils
|
||||
|
||||
@@ -13,6 +13,10 @@ ExclusiveArch: x86_64
|
||||
BuildRequires: rust >= 1.85
|
||||
BuildRequires: cargo
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: systemd-rpm-macros
|
||||
|
||||
Requires(pre): shadow-utils
|
||||
|
||||
Reference in New Issue
Block a user