-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add home-manager CI #220
Merged
Merged
Add home-manager CI #220
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
325fc19
Add home-manager CI
kachick 266db5b
Install home-manager
kachick 51a1aa2
Split files
kachick a8f4709
After removing, steps will work...?
kachick b71d182
Matrix run
kachick 740117b
Remove backuped files
kachick a5a5643
Update badges in README
kachick 4df174c
Update triggers
kachick 5acb73e
Shorter matrix variable for overview
kachick 24f6d59
Fix matrix for macos
kachick b9599f1
Fix matrix for macos with the bash and zsh difference
kachick ec949a1
Fix matrix for macos that has .bashrc :<
kachick 33134aa
Refactor file paths
kachick 39e4bc4
Add test steps
kachick 32221ab
I forgot the bash handling
kachick 52b07b7
I should be anywhere
kachick 40118dd
Remove duplicated and longtime devenv steps from home-manager CI
kachick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: CI - Home | ||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- '.github/workflows/ci-home.yml' | ||
- '**/home-manager/**.nix' | ||
- 'Makefile.toml' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/ci-home.yml' | ||
- '**/home-manager/**.nix' | ||
- 'Makefile.toml' | ||
schedule: | ||
# Every 10:42 JST | ||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | ||
- cron: '42 1 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
home-manager: | ||
timeout-minutes: 30 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-22.04 | ||
- macos-13 | ||
home-manager-channel: | ||
- release-23.05 | ||
- master # unstable nixpkgs | ||
include: | ||
- os: ubuntu-22.04 | ||
cleanup-script: | | ||
rm '/home/runner/.config/nix/nix.conf' | ||
rm '/home/runner/.config/home-manager/home.nix' | ||
rm '/home/runner/.bashrc' | ||
rm '/home/runner/.bash_logout' | ||
- os: macos-13 | ||
# Latest macOS sets default shell as zsh, but having .bashrc except .bash_logout | ||
cleanup-script: | | ||
rm '/Users/runner/.config/nix/nix.conf' | ||
rm '/Users/runner/.config/home-manager/home.nix' | ||
rm '/Users/runner/.bashrc' | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: DeterminateSystems/nix-installer-action@v4 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v2 | ||
- name: Register Nix Channels | ||
run: | | ||
nix-channel --add https://github.com/nix-community/home-manager/archive/${{ matrix.home-manager-channel }}.tar.gz home-manager | ||
nix-channel --update | ||
nix-channel --list | ||
- run: nix-shell '<home-manager>' -A install | ||
- name: Clean up conflict files with applying by home-manager | ||
run: | | ||
${{ matrix.cleanup-script }} | ||
- uses: actions/checkout@v3 | ||
- run: home-manager switch -f ./home/.config/home-manager/user-github-actions.nix | ||
- name: Print shell paths | ||
run: | | ||
which fish | ||
which zsh | ||
which bash # Be non nix shell | ||
- name: Run customized dependencies | ||
run: | | ||
fish --command 'starship --version' | ||
zsh -c 'bench_shells' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ ... }: | ||
|
||
{ | ||
imports = [ ./home.nix ]; | ||
home.username = "runner"; | ||
} | ||
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. This file should be put outsides the |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Preparation for updating to unstable nixpkgs #147 (comment)