~janbaudisch/aoc-2019

decf9b6f080f053df39b9dbd34fce24b77470a45 — Jan Baudisch 4 years ago ded07f6 master
move to sourcehut
9 files changed, 70 insertions(+), 99 deletions(-)

A .builds/beta.yml
A .builds/lint.yml
A .builds/nightly.yml
A .builds/stable.yml
D .github/workflows/format.yml
D .github/workflows/lint.yml
D .github/workflows/run.yml
D .github/workflows/test.yml
M README.md
A .builds/beta.yml => .builds/beta.yml +16 -0
@@ 0,0 1,16 @@
image: alpine/latest
package:
  - alpine-sdk
  - curl
sources:
  - https://git.sr.ht/~janbaudisch/aoc-2019
tasks:
  - setup: curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain beta
  - build: |
      . $HOME/.cargo/env
      cd aoc-2019
      cargo build --verbose --all
  - test: |
      . $HOME/.cargo/env
      cd aoc-2019
      cargo test --verbose --all

A .builds/lint.yml => .builds/lint.yml +20 -0
@@ 0,0 1,20 @@
image: alpine/latest
package:
  - alpine-sdk
  - curl
sources:
  - https://git.sr.ht/~janbaudisch/aoc-2019
tasks:
  - setup: |
      curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
      . $HOME/.cargo/env
      rustup component add rustfmt
      rustup component add clippy
  - format: |
      . $HOME/.cargo/env
      cd aoc-2019
      cargo fmt --all -- --check
  - lint: |
      . $HOME/.cargo/env
      cd aoc-2019
      cargo clippy --all -- --deny clippy::all

A .builds/nightly.yml => .builds/nightly.yml +16 -0
@@ 0,0 1,16 @@
image: alpine/latest
package:
  - alpine-sdk
  - curl
sources:
  - https://git.sr.ht/~janbaudisch/aoc-2019
tasks:
  - setup: curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
  - build: |
      . $HOME/.cargo/env
      cd aoc-2019
      cargo build --verbose --all
  - test: |
      . $HOME/.cargo/env
      cd aoc-2019
      cargo test --verbose --all

A .builds/stable.yml => .builds/stable.yml +16 -0
@@ 0,0 1,16 @@
image: alpine/latest
package:
  - alpine-sdk
  - curl
sources:
  - https://git.sr.ht/~janbaudisch/aoc-2019
tasks:
  - setup: curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
  - build: |
      . $HOME/.cargo/env
      cd aoc-2019
      cargo build --verbose --all
  - test: |
      . $HOME/.cargo/env
      cd aoc-2019
      cargo test --verbose --all

D .github/workflows/format.yml => .github/workflows/format.yml +0 -14
@@ 1,14 0,0 @@
name: Format

on: [push, pull_request]

jobs:
  test:
    name: Format
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@master
    
    - name: Format
      run: cargo fmt --all -- --check

D .github/workflows/lint.yml => .github/workflows/lint.yml +0 -14
@@ 1,14 0,0 @@
name: Lint

on: [push, pull_request]

jobs:
  test:
    name: Lint
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@master
    
    - name: Lint
      run: cargo clippy --all -- --deny clippy::all

D .github/workflows/run.yml => .github/workflows/run.yml +0 -23
@@ 1,23 0,0 @@
name: Run

on: [push, pull_request]

jobs:
  run:
    name: Run on Rust ${{ matrix.rust }}
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust: [stable, beta, nightly]

    steps:
    - name: Checkout
      uses: actions/checkout@master

    - name: Setup Rust
      run: |
        rustup toolchain add ${{ matrix.rust }}
        rustup default ${{ matrix.rust }}

    - name: Run
      run: ./run.bash

D .github/workflows/test.yml => .github/workflows/test.yml +0 -46
@@ 1,46 0,0 @@
name: Test

on: [push, pull_request]

jobs:
  test:
    name: Test Rust ${{ matrix.rust }} on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        rust: [stable, beta, nightly]

    steps:
    - name: Checkout
      uses: actions/checkout@master

    - name: Setup Rust
      if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
      run: |
        rustup toolchain add ${{ matrix.rust }}
        rustup default ${{ matrix.rust }}

    - name: Setup Rust
      if: matrix.os == 'macos-latest'
      run: curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${{ matrix.rust }}

    - name: Build
      if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
      run: cargo build --all --verbose

    - name: Build
      if: matrix.os == 'macos-latest'
      run: |
        source $HOME/.cargo/env
        cargo build --all --verbose

    - name: Test
      if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
      run: cargo test --all --verbose

    - name: Test
      if: matrix.os == 'macos-latest'
      run: |
         source $HOME/.cargo/env
         cargo test --all --verbose

M README.md => README.md +2 -2
@@ 4,6 4,6 @@

> My Rust implementation of [Advent of Code 2019][aoc-url].

[build-img]: https://img.shields.io/github/workflow/status/janbaudisch/aoc-2019/Test?label=Build
[build-url]: https://github.com/janbaudisch/aoc-2019/actions?query=workflow%3ATest
[build-img]: https://builds.sr.ht/~janbaudisch/aoc-2019.svg
[build-url]: https://builds.sr.ht/~janbaudisch/aoc-2019
[aoc-url]: https://adventofcode.com/2019