Compare commits
2 Commits
ee38b17138
...
331092ff44
Author | SHA1 | Date | |
---|---|---|---|
|
331092ff44 | ||
|
89958b0fa0 |
10
.woodpecker/.all-checks-complete.yml
Normal file
10
.woodpecker/.all-checks-complete.yml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
steps:
|
||||||
|
echo:
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- echo "All required checks complete"
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- build
|
||||||
|
|
||||||
|
skip_clone: true
|
16
.woodpecker/.build.yml
Normal file
16
.woodpecker/.build.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
steps:
|
||||||
|
build:
|
||||||
|
image: nixos/nix
|
||||||
|
commands:
|
||||||
|
- echo 'experimental-features = flakes nix-command' >> /etc/nix/nix.conf
|
||||||
|
# Lint
|
||||||
|
- "nix flake check"
|
||||||
|
# Test
|
||||||
|
- nix develop --command dotnet test
|
||||||
|
- nix develop --command dotnet test --configuration Release
|
||||||
|
- nix develop --command alejandra --check .
|
||||||
|
|
||||||
|
when:
|
||||||
|
- event: "push"
|
||||||
|
evaluate: 'CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH'
|
||||||
|
- event: "pull_request"
|
63
flake.nix
63
flake.nix
@@ -1,26 +1,45 @@
|
|||||||
{
|
{
|
||||||
description = "Advent of Code 2023";
|
description = "Advent of Code 2023";
|
||||||
inputs = {
|
inputs = {
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
}: flake-utils.lib.eachDefaultSystem (system:
|
}:
|
||||||
let pkgs = nixpkgs.legacyPackages.${system}; in
|
flake-utils.lib.eachDefaultSystem (
|
||||||
{
|
system: let
|
||||||
devShells = { default = pkgs.mkShell {
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
buildInputs = with pkgs; [
|
in
|
||||||
(with dotnetCorePackages;
|
# Conditionally include Swift and Apple SDK for Darwin systems
|
||||||
combinePackages [
|
let
|
||||||
dotnet-sdk_8
|
darwinDeps =
|
||||||
dotnetPackages.Nuget
|
if system == "x86_64-darwin" || system == "aarch64-darwin"
|
||||||
])
|
then [
|
||||||
] ++ [pkgs.swift darwin.apple_sdk.frameworks.Foundation darwin.apple_sdk.frameworks.CryptoKit darwin.apple_sdk.frameworks.GSS pkgs.zlib pkgs.zlib.dev pkgs.openssl pkgs.icu];
|
pkgs.swift
|
||||||
};};
|
pkgs.darwin.apple_sdk.frameworks.Foundation
|
||||||
}
|
pkgs.darwin.apple_sdk.frameworks.CryptoKit
|
||||||
|
pkgs.darwin.apple_sdk.frameworks.GSS
|
||||||
|
]
|
||||||
|
else [];
|
||||||
|
in {
|
||||||
|
devShells = {
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs;
|
||||||
|
[
|
||||||
|
(with dotnetCorePackages;
|
||||||
|
combinePackages [
|
||||||
|
dotnet-sdk_8
|
||||||
|
dotnetPackages.Nuget
|
||||||
|
])
|
||||||
|
]
|
||||||
|
++ darwinDeps
|
||||||
|
++ [pkgs.zlib pkgs.zlib.dev pkgs.openssl pkgs.icu pkgs.alejandra];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user