From 73594458cb59255ca9935c772ad4374c2288d7d6 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 13 Nov 2023 15:45:45 +1100 Subject: [PATCH] CI: Add initial github actions Copy the workflow from `rust-bitcoin` and strip it down. --- .github/workflows/rust.yml | 76 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..a87b701 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,76 @@ +on: + push: + branches: + - master + - 'test-ci/**' + pull_request: + +name: Continuous integration + +jobs: + Stable: + name: Test - stable toolchain + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout Crate + uses: actions/checkout@v4 + - name: Checkout Toolchain + # https://github.com/dtolnay/rust-toolchain + uses: dtolnay/rust-toolchain@stable + - name: Running test script + env: + DO_LINT: true + DO_NO_STD: true + DO_DOCS: true + run: ./contrib/test.sh + + Beta: + name: Test - beta toolchain + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout Crate + uses: actions/checkout@v4 + - name: Checkout Toolchain + uses: dtolnay/rust-toolchain@beta + - name: Running test script + env: + DO_NO_STD: true + run: ./contrib/test.sh + + Nightly: + name: Test - nightly toolchain + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout Crate + uses: actions/checkout@v4 + - name: Checkout Toolchain + uses: dtolnay/rust-toolchain@nightly + - name: Running test script + env: + DO_FMT: false + DO_NO_STD: true + DO_DOCSRS: true + run: ./contrib/test.sh + + MSRV: + name: Test - 1.56.1 toolchain + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout Crate + uses: actions/checkout@v4 + - name: Checkout Toolchain + uses: dtolnay/rust-toolchain@stable + with: + toolchain: "1.56.1" + - name: Running test script + env: + DO_NO_STD: true + run: ./contrib/test.sh