From e984dbf0cc2be08b98510c62c4cd3d641952dde0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Sat, 22 Jun 2024 23:00:49 +0200 Subject: [PATCH] ci: add GitHub Action --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ README.md | 4 ++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b7aad79 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: "ci" + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +env: + CARGO_TERM_COLOR: "always" + +jobs: + ci: + runs-on: "ubuntu-latest" + strategy: + matrix: + rust-version: ["1.79.0", "stable"] + steps: + - uses: "actions/checkout@v4.1.7" + + - uses: "dtolnay/rust-toolchain@master" + with: + toolchain: "${{ matrix.rust-version }}" + components: "clippy, rustfmt" + + - run: "rustc --version" + - run: "cargo build --verbose" + - run: "cargo test --verbose" + - run: "cargo clippy --verbose -- -D warnings" + - run: "cargo fmt -- --check" diff --git a/README.md b/README.md index 92cc0c5..752cbd5 100644 --- a/README.md +++ b/README.md @@ -57,11 +57,11 @@ cargo build --release # Usage: ./target/release/billion_row_challenge -# Example with the tests fixture data +# Example with fixture data ./target/release/billion_row_challenge ./tests/fixtures/10/input.txt # Example with the 1 billion row data (not included in the repository, needs to be generated) -./target/release/billion_row_challenge measurements.txt +./target/release/billion_row_challenge ./1brc/measurements.txt ``` ### Generate the 1 Billion Row Data (~12GB)