From 665b72c9a6fb33178f2c6f5649bad95ac1e85097 Mon Sep 17 00:00:00 2001 From: Petr Pavlu Date: Tue, 24 Sep 2024 12:57:25 +0200 Subject: [PATCH] Add initial GitHub CI --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) 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..f34cb95 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: Continuous integration + +on: push + +env: + CARGO_TERM_COLOR: always + +jobs: + build_and_test: + name: Build and test + runs-on: ubuntu-latest + container: opensuse/tumbleweed + strategy: + fail-fast: false + matrix: + toolchain: + - distribution + - stable + - beta + - nightly + steps: + - name: Check out the repository + uses: actions/checkout@v4 + - name: Install the ${{ matrix.toolchain }} Rust toolchain + shell: bash + run: | + if [ ${{ matrix.toolchain }} == distribution ]; then + zypper --non-interactive install cargo rust + else + zypper --non-interactive install rustup + rustup update ${{ matrix.toolchain }} + rustup default ${{ matrix.toolchain }} + fi + - name: Build the project + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose