Skip to content

Commit

Permalink
ci: Use {{runner.temp}}
Browse files Browse the repository at this point in the history
Otherwise, we risk multiple jobs using the same directory.
  • Loading branch information
srid committed Oct 4, 2024
1 parent 3547a90 commit ebce6fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- main
- update_flake_lock_action
- ci/**
pull_request:
jobs:
nix:
Expand All @@ -25,21 +26,23 @@ jobs:
- name: NixOS test
if: matrix.system == 'x86_64-linux'
run: |
om init .#nixos -o /tmp/nixconfig \
CONF=${{ runner.temp }}/nixos && mkdir $CONF
om init .#nixos -o $CONF \
--non-interactive \
--params '{"hostname": "example", "username": "srid", "git-name": "Srid", "git-email": "[email protected]"}'
set -x
nix build /tmp/nixconfig#nixosConfigurations.example.config.system.build.toplevel
nix build ${CONF}#nixosConfigurations.example.config.system.build.toplevel
type -f ./result/etc/profiles/per-user/srid/bin/git
- name: nix-darwin test
if: matrix.system == 'aarch64-darwin' || matrix.system == 'x86_64-darwin'
run: |
om init .#darwin -o /tmp/nixconfig \
CONF=${{ runner.temp }}/darwin && mkdir $CONF
om init .#darwin -o $CONF \
--non-interactive \
--params '{"hostname": "example", "username": "srid", "git-name": "Srid", "git-email": "[email protected]"}'
set -x
nix build /tmp/nixconfig#darwinConfigurations.example.config.system.build.toplevel
nix build ${CONF}#darwinConfigurations.example.config.system.build.toplevel
type -f ./result/etc/profiles/per-user/srid/bin/git
# TODO: Use `om init` like above
Expand Down
1 change: 1 addition & 0 deletions modules/flake-parts/test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
findutils
gnugrep
];
# FIXME: This should use `{{ runner.temp }}` from ci.yaml
text = ''
set -x
# Override the home directory to a temp location
Expand Down

0 comments on commit ebce6fb

Please sign in to comment.