-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use Nix and put the CI for contributors #166
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: CI - Nix | ||
on: | ||
pull_request: | ||
paths: | ||
- '.github/workflows/ci-nix.yml' | ||
- '*.nix' | ||
- 'flake.*' | ||
schedule: | ||
# Every 10:42 JST | ||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | ||
- cron: '42 1 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
tasks: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: DeterminateSystems/nix-installer-action@v4 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v2 | ||
- run: nix flake check | ||
- run: nix develop --command echo 'This step should be done before any other "nix develop" steps because of measuring Nix build time' | ||
- run: nix develop --command make all | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. これに伴って make の task 一つで良いので増やしてそれを走らせると便利そう |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ public | |
.DS_Store | ||
**/.hugo_build.lock | ||
tmp | ||
.direnv/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"recommendations": [ | ||
"golang.go", | ||
"github.vscode-github-actions", | ||
"editorconfig.editorconfig", | ||
"tekumara.typos-vscode", | ||
"dprint.dprint", | ||
"jnoortheen.nix-ide", | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"editor.defaultFormatter": "dprint.dprint", | ||
"editor.formatOnSave": true, | ||
"[nix]": { | ||
"editor.defaultFormatter": "jnoortheen.nix-ide" | ||
}, | ||
"[go]": { | ||
"editor.defaultFormatter": "golang.go" | ||
} | ||
} | ||
Comment on lines
+1
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 置かせてもらえると嬉しいけれど、 vim 党として許せないと言うなら已む無し There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 置いてもいいよ! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 感謝~ 😂 それか、 .vscode を gitignore に入れちゃって、後はお前ら勝手にやれというのも一つの手なんだろうなぁ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/7fd307937db70af23b956c4539033542809ae263"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
in | ||
{ | ||
devShells.default = with pkgs; | ||
mkShell { | ||
buildInputs = [ | ||
hugo | ||
go_1_20 | ||
gnumake | ||
coreutils | ||
peco | ||
typos | ||
dprint | ||
actionlint | ||
nil | ||
nixpkgs-fmt | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. vim と fzf もほしいのでは There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. その辺は home-manager で使ってるのよね~ というより、このリポジトリとして依存してないならここに入れない方が良いかなーという部分なんですが、どっかつかってましたっけ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. EDITOR=vim makefile にあったわ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. vim をこういうとこ入れるって初耳だけど入れてみた |
||
vim | ||
]; | ||
}; | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
基本控えめな契機にしつつ、定時実行だけ入れさせてもらいました。本当は Makefile の変更とかも引っ掛けたいけど、他のCIに比べて重めなのでストレスにならんようにと