Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
simmsb committed Jul 17, 2023
1 parent 4a72236 commit 3ddd5cb
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 36 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: |
mkdir -p $HOME/.config/nix/
echo "substituters = https://cache.nixos.org https://hydra.iohk.io" >> $HOME/.config/nix/nix.conf
echo "trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" >> $HOME/.config/nix/nix.conf
- uses: cachix/cachix-action@v12
with:
name: simmsb-calamity
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Cache Nix dependencies
run: |
nix develop -j 4 -c echo
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- name: Run the Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Build 🔨
id: build
run: |
nix build -j auto -L
nix build .#calamity -L
- name: Flake checks 🧪
run: |
# Because 'nix flake check' is not system-aware
# See https://srid.ca/haskell-template/checks
nix run nixpkgs#sd 'systems = nixpkgs.lib.systems.flakeExposed' 'systems = [ "x86_64-linux" ]' flake.nix
nix flake check -L
nix --option sandbox false build .#check -L
28 changes: 14 additions & 14 deletions bot/bot.cabal
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
cabal-version: 2.0
name: bot
version: 0.0.0
license: MIT
copyright: 2019 Ben Simms
maintainer: ben@bensimms.moe
author: Ben Simms
tested-with: GHC ==8.10.7
homepage: https://github.com/nitros12/calamity-bot
bug-reports: https://github.com/nitros12/calamity-bot/issues
synopsis: A discord bot
description: A discord bot
category: Bots
build-type: Simple
cabal-version: 2.0
name: bot
version: 0.0.0
license: MIT
copyright: 2019 Ben Simms
maintainer: ben@bensimms.moe
author: Ben Simms
tested-with: GHC ==8.10.7
homepage: https://github.com/nitros12/calamity-bot
bug-reports: https://github.com/nitros12/calamity-bot/issues
synopsis: A discord bot
description: A discord bot
category: Bots
build-type: Simple

source-repository head
type: git
Expand Down
2 changes: 1 addition & 1 deletion calamity/calamity.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ library
, calamity-commands >=0.4 && <0.5
, colour >=2.3.5 && <2.4
, concurrent-extra >=0.7 && <0.8
, containers >=0.6 && <0.7
, crypton-connection >=0.2.6 && <0.4
, crypton-x509-system >=1.6.6 && <1.7
, containers >=0.6 && <0.7
, data-default-class >=0.1 && <0.2
, data-flags >=0.0.3 && <0.1
, deepseq >=1.4.4.0 && <2
Expand Down
16 changes: 16 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
flake-parts.url = "github:hercules-ci/flake-parts";

haskell-flake.url = "github:srid/haskell-flake";
check-flake.url = "github:srid/check-flake";

treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
Expand All @@ -28,10 +29,11 @@
inputs.haskell-flake.flakeModule
inputs.treefmt-nix.flakeModule
inputs.flake-root.flakeModule
inputs.check-flake.flakeModule
];
perSystem = { self', lib, config, pkgs, ... }: {
haskellProjects.default = {
basePackages = pkgs.haskell.packages.ghc944;
basePackages = pkgs.haskell.packages.ghc944;

packages = {
crypton-connection.source = "0.3.1";
Expand Down

0 comments on commit 3ddd5cb

Please sign in to comment.