Skip to content

Year2023.Day01

Year2023.Day01 #49

Workflow file for this run

name: Continuous Integration ๐Ÿ‘ฎโ€โ™‚๏ธ
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout source ๐Ÿ“ก
uses: actions/checkout@v3
- name: 'Install HLint ๐Ÿ“ก'
uses: haskell-actions/hlint-setup@v2
with:
version: '3.6.1'
- name: 'Run HLint ๐Ÿ“'
uses: haskell-actions/hlint-run@v2
with:
path: '["app/", "src/", "test/"]'
fail-on: warning
style:
runs-on: ubuntu-latest
steps:
- name: Checkout source ๐Ÿ“ก
uses: actions/checkout@v3
- name: Styling ๐Ÿ’…
uses: haskell-actions/run-ormolu@v14
with:
version: '0.7.3.0'
test:
runs-on: ubuntu-latest
steps:
- name: Checkout source ๐Ÿ“ก
uses: actions/checkout@v3
- name: Cache ~/.stack ๐Ÿ“ฆ
uses: actions/cache@v3
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
restore-keys: |
${{ runner.os }}-stack-global-
- name: Cache .stack-work ๐Ÿ“ฆ
uses: actions/cache@v3
with:
path: .stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}-${{ hashFiles('**/*.hs') }}
restore-keys: |
${{ runner.os }}-stack-work-
- name: Install Stack ๐Ÿ“ก
uses: haskell-actions/setup@v2
with:
ghc-version: 9.4.7
enable-stack: true
stack-version: "latest"
- name: Build โš’
run: stack build --test --no-run-tests
- name: Test ๐Ÿšง
run: stack test
run:
needs: [lint, style, test]
runs-on: ubuntu-latest
strategy:
matrix:
year: [2021, 2020]
steps:
- name: Checkout source ๐Ÿ“ก
uses: actions/checkout@v3
- name: Cache ~/.stack ๐Ÿ“ฆ
uses: actions/cache@v3
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
restore-keys: |
${{ runner.os }}-stack-global-
- name: Cache .stack-work ๐Ÿ“ฆ
uses: actions/cache@v3
with:
path: .stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}-${{ hashFiles('**/*.hs') }}
restore-keys: |
${{ runner.os }}-stack-work-
- name: Install Stack ๐Ÿ“ก
uses: haskell-actions/setup@v2
with:
ghc-version: 9.4.7
enable-stack: true
stack-version: "latest"
- name: Run ๐Ÿš€
run: stack run advent-of-code-${{ matrix.year }}-exe