From ef00ba34f2b8fbfa33ba268d2c652c275757017b Mon Sep 17 00:00:00 2001 From: valkyrie_pilot Date: Sun, 12 Mar 2023 18:36:36 -0600 Subject: [PATCH 1/4] add simple checking action --- .github/workflows/pr.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..4454203 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,32 @@ +name: Check code +on: + push: + pull_request: + workflow_dispatch: + +jobs: + build: + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Check out code into the proper directory + uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Cache rust + uses: Swatinem/rust-cache@v2 + + - name: Install rust + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + + - name: Check formatting + run: cargo fmt --check + + - name: Check clippy lints + run: cargo clippy From 3cdcd33d68fa40b98600117f6dbce8f1783e1759 Mon Sep 17 00:00:00 2001 From: valkyrie_pilot Date: Sun, 12 Mar 2023 18:40:03 -0600 Subject: [PATCH 2/4] Disable fail-fast Failing fast is counter-productive, given that we want to know what OSes break. --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4454203..581b4cc 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -7,7 +7,7 @@ on: jobs: build: strategy: - fail-fast: true + fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} From a57585463282fb929b0d1a5556304e905b92c2fd Mon Sep 17 00:00:00 2001 From: valkyrie_pilot Date: Sun, 12 Mar 2023 18:42:51 -0600 Subject: [PATCH 3/4] test on nightly as well as stable --- .github/workflows/pr.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4454203..731f13b 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -10,6 +10,7 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest, macos-latest] + rust-version: [stable, nightly] runs-on: ${{ matrix.os }} steps: - name: Check out code into the proper directory @@ -21,8 +22,9 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Install rust - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@master with: + toolchain: ${{ matrix.rust-version }} components: rustfmt, clippy - name: Check formatting From 00df8264f87f9aec6bb2325c8d746f5ce7e563c6 Mon Sep 17 00:00:00 2001 From: valkyrie_pilot Date: Sun, 12 Mar 2023 18:44:09 -0600 Subject: [PATCH 4/4] Remove windows because it doesn't work yet --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 314b086..a4dd98a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, macos-latest] rust-version: [stable, nightly] runs-on: ${{ matrix.os }} steps: