Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

push to cachix #1

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 9 additions & 50 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,59 +5,18 @@ on:
- pull_request

jobs:

nix-build:
name: Nix build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v16
- name: Build dependencies
run: nix develop --command ghc --version
- name: Build weiss-xmonad
run: nix build -L
- name: Build weiss-xmonad shell
run: nix build -L '.#devShells.x86_64-linux.default'

stack-build:
name: Stack ${{ matrix.resolver }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
resolver: [ nightly, lts-19, lts-18, lts-17, lts-16, lts-15, lts-14 ]
os: [ macos-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v1
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
enable-stack: true
## For some reason, stack caching seems to be very brittle, and cause a lot of build failures.
## I haven't investigated very thoroughly what to best do about this, but for now, I'm just not caching stack builds.
- run: stack init --resolver ${{ matrix.resolver }}
- run: stack build --resolver ${{ matrix.resolver }} --only-dependencies
- run: stack build --resolver ${{ matrix.resolver }}
- run: stack build --resolver ${{ matrix.resolver }} --haddock --test --bench --no-run-benchmarks

cabal-build:
name: Cabal with GHC ${{ matrix.ghc }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ghc: [ '8.6.5', '8.8.3', '8.10.7', '9.0.2', '9.2.2' ]
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v1
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v14
with:
ghc-version: ${{ matrix.ghc }}
- uses: actions/cache@v2
with:
path: |
~/.cabal
dist-newstyle
key: cabal-cache-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal') }}
- run: cabal new-build --only-dependencies
- run: cabal new-build
- run: cabal new-test --test-show-details=direct
name: weiss
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Build weiss-xmonad
run: nix build .#
Loading