forked from apache/horaedb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: config github action (apache#1)
* build: config github action Signed-off-by: Ruihang Xia <[email protected]> * fix comment syntax Signed-off-by: Ruihang Xia <[email protected]> * comment out other stages Signed-off-by: Ruihang Xia <[email protected]> * setup build env Signed-off-by: Ruihang Xia <[email protected]> * ignore vergen error Signed-off-by: Ruihang Xia <[email protected]> * enable cache steps Signed-off-by: Ruihang Xia <[email protected]> * set default vergen env Signed-off-by: Ruihang Xia <[email protected]> * add more jobs Signed-off-by: Ruihang Xia <[email protected]> * fix trigger Signed-off-by: Ruihang Xia <[email protected]> * fix build env Signed-off-by: Ruihang Xia <[email protected]> * submodule add parquet test data Signed-off-by: Ruihang Xia <[email protected]> * enable dep cache Signed-off-by: Ruihang Xia <[email protected]> * replace tab with white space Signed-off-by: Ruihang Xia <[email protected]> * ignore document change Signed-off-by: Ruihang Xia <[email protected]>
- Loading branch information
Showing
6 changed files
with
191 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,180 @@ | ||
# Copyright 2022 CeresDB Project Authors. Licensed under Apache-2.0. | ||
|
||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'etc/**' | ||
- '**.md' | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'etc/**' | ||
- '**.md' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
# build the library, a compilation step used by multiple steps below | ||
linux-build-lib: | ||
name: Build Libraries with Rust ${{ matrix.rust }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: [1.59.0] | ||
container: | ||
image: rust:${{ matrix.rust }}-slim-bullseye | ||
env: | ||
# Disable full debug symbol generation to speed up CI build and keep memory down | ||
# "1" means line tables only, which is useful for panic tracebacks. | ||
RUSTFLAGS: "-C debuginfo=1" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# with: | ||
# submodules: true | ||
- name: Cache Cargo | ||
uses: actions/cache@v3 | ||
with: | ||
path: /github/home/.cargo | ||
key: cargo-cache- | ||
- name: Cache Rust dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /github/home/target | ||
key: ${{ runner.os }}-target-cache-${{ matrix.rust }}- | ||
- name: Cache Build Dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /github/home | ||
key: ${{ runner.os }}-toolchain-cache- | ||
- name: Setup Build Environment | ||
run: | | ||
apt update | ||
apt install --yes gcc g++ libssl-dev pkg-config cmake | ||
rm -rf /var/lib/apt/lists/* | ||
- name: Build workspace in debug mode | ||
run: | | ||
make build-ut | ||
env: | ||
CARGO_HOME: "/github/home/.cargo" | ||
CARGO_TARGET_DIR: "/github/home/target/debug" | ||
|
||
style-check: | ||
name: Libraries Style Check | ||
needs: [linux-build-lib] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: [1.59.0] | ||
container: | ||
image: rust:${{ matrix.rust }}-slim-bullseye | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Build Environment | ||
run: | | ||
apt update | ||
apt install --yes cmake | ||
rm -rf /var/lib/apt/lists/* | ||
- name: Setup Toolchain | ||
run: | | ||
rustup component add rustfmt | ||
- name: Run | ||
run: | | ||
make fmt | ||
env: | ||
CARGO_HOME: "/github/home/.cargo" | ||
CARGO_TARGET_DIR: "/github/home/target/debug" | ||
|
||
clippy: | ||
name: Clippy | ||
needs: [linux-build-lib] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: [1.59.0] | ||
container: | ||
image: rust:${{ matrix.rust }}-slim-bullseye | ||
env: | ||
RUSTFLAGS: "-C debuginfo=1" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# with: | ||
# submodules: true | ||
- name: Cache Cargo | ||
uses: actions/cache@v3 | ||
with: | ||
path: /github/home/.cargo | ||
key: cargo-cache- | ||
- name: Cache Rust dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /github/home/target | ||
key: ${{ runner.os }}-target-cache-${{ matrix.rust }}- | ||
- name: Cache Build Dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /github/home | ||
key: ${{ runner.os }}-toolchain-cache- | ||
- name: Setup Build Environment | ||
run: | | ||
apt update | ||
apt install --yes gcc g++ libssl-dev pkg-config cmake | ||
rm -rf /var/lib/apt/lists/* | ||
- name: Install Clippy | ||
run: | | ||
rustup component add clippy | ||
- name: Run Clippy | ||
run: | | ||
make clippy | ||
env: | ||
CARGO_HOME: "/github/home/.cargo" | ||
CARGO_TARGET_DIR: "/github/home/target/debug" | ||
|
||
linux-test: | ||
name: Test Workspace with Rust ${{ matrix.rust }} | ||
needs: [linux-build-lib] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: [1.59.0] | ||
container: | ||
image: rust:${{ matrix.rust }}-slim-bullseye | ||
env: | ||
RUSTFLAGS: "-C debuginfo=1" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# with: | ||
# submodule: true | ||
- name: Cache Cargo | ||
uses: actions/cache@v3 | ||
with: | ||
path: /github/home/.cargo | ||
key: cargo-cache- | ||
- name: Cache Rust dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /github/home/target | ||
key: ${{ runner.os }}-target-cache-${{ matrix.rust }}- | ||
- name: Cache Build Dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: /github/home | ||
key: ${{ runner.os }}-toolchain-cache- | ||
- name: Setup Build Environment | ||
run: | | ||
apt update | ||
apt install --yes gcc g++ libssl-dev pkg-config cmake | ||
- name: Run Tests | ||
run: | | ||
make test-ut | ||
env: | ||
CARGO_HOME: "/github/home/.cargo" | ||
CARGO_TARGET_DIR: "/github/home/target/debug" | ||
RUST_BACKTRACE: "1" |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "components/parquet-testing"] | ||
path = components/parquet-testing | ||
url = https://github.com/apache/parquet-testing.git |
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
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 |
---|---|---|
|
@@ -22,5 +22,5 @@ fn main() { | |
} | ||
} | ||
|
||
vergen(config).expect("Vergen failed to generate config"); | ||
let _ = vergen(config); | ||
} |
Submodule parquet-testing
added at
7175a4
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