Automatically create the local data folder (#203) #542
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
# Copyright 2022 The ModelarDB Contributors | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: Cargo Build, Lint, and Test | |
on: | |
pull_request: | |
branches: [ "main" ] | |
push: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: -C instrument-coverage -C strip=symbols -D warnings | |
RUSTDOCFLAGS: -D warnings | |
LLVM_PROFILE_FILE: modelardb-%p-%m.profraw | |
jobs: | |
cargo_build_lint_and_test: | |
name: Cargo Build, Lint, and Test | |
# macos-13 is used instead of macos-latest due to "stepWithCompactEncoding | |
# - invalid compact unwind encoding" occurring in libunwind when using | |
# macos-latest, this is maybe related to rust-lang/rust/issues/113783. | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ubuntu-latest, macos-13, windows-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Rustup Update | |
run: rustup update | |
- name: Rustup Add llvm-tools | |
run: rustup component add llvm-tools-preview | |
- name: Cargo Install grcov | |
run: cargo install grcov | |
- name: Cargo Install machete | |
run: cargo install cargo-machete | |
- name: Cargo Build | |
run: cargo build --verbose --all-targets | |
- name: Cargo Clippy | |
run: cargo clippy --verbose --all-targets | |
- name: Cargo Doc | |
run: cargo doc --verbose --no-deps | |
- name: Cargo Machete | |
run: cargo machete --with-metadata | |
- name: Cargo Test | |
run: cargo test --verbose --all-targets -- --nocapture | |
- name: grcov | |
run: grcov . --source-dir . --binary-path ./target/debug/ --output-types html --branch --ignore-not-existing -o ./target/debug/coverage/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Code Coverage ${{ matrix.operating-system }} | |
path: ./target/debug/coverage/ |