π #336
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
name: CI - Home | |
on: | |
push: | |
branches: [main] | |
paths: | |
- '.github/workflows/ci-home.yml' | |
- '**/home-manager/**.nix' | |
- '*.nix' | |
- 'flake.*' | |
- 'Makefile.toml' | |
pull_request: | |
paths: | |
- '.github/workflows/ci-home.yml' | |
- '**/home-manager/**.nix' | |
- '*.nix' | |
- 'flake.*' | |
- '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 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: DeterminateSystems/nix-installer-action@v6 | |
- uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- uses: actions/checkout@v4 | |
# https://www.reddit.com/r/Nix/comments/1443k3o/comment/jr9ht5g/?utm_source=reddit&utm_medium=web2x&context=3 | |
- run: mkdir -p ~/.local/state/nix/profiles | |
- run: nix run .#home-manager -- switch -b backup --flake .#github-actions | |
- name: Print some paths and versions | |
run: | | |
which fish | |
which zsh | |
which bash | |
which ruby | |
which irb | |
which ssh | |
# Do not use interactive mode here. | |
# Solutions as https://github.com/actions/runner/issues/241#issuecomment-924327172 will not fit with several problems | |
- name: Run customized dependencies | |
run: | | |
fish --command 'starship --version' | |
zsh -c 'which dprint' | |
zsh -c 'ruby --version' | |
zsh -c 'irb --version' | |
zsh -c 'alacritty --version' | |
zsh -c 'ssh -V' | |
- name: Run homemade commands | |
run: zsh -c 'la' |