This commit is contained in:
@@ -35,8 +35,5 @@ jobs:
|
|||||||
key: esphome-${{ hashFiles('*.yaml', 'templates/*.yaml', 'components/**') }}
|
key: esphome-${{ hashFiles('*.yaml', 'templates/*.yaml', 'components/**') }}
|
||||||
restore-keys: esphome-
|
restore-keys: esphome-
|
||||||
|
|
||||||
# Uses the ci shell, which installs esphome via pipx at the exact version
|
|
||||||
# pinned in Nix. The ci shell avoids nixpkgs wrapping platformio in bwrap,
|
|
||||||
# which fails on CI runners that disallow unprivileged user namespaces.
|
|
||||||
- name: Compile All
|
- name: Compile All
|
||||||
run: nix develop .#ci --command make compile-all
|
run: nix develop .#ci --command make compile-all
|
||||||
|
|||||||
@@ -57,20 +57,18 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# CI shell: uses the same esphome version as default, but installs it
|
# CI shell: uses the same esphome version as default, but overrides
|
||||||
# via pipx to avoid nixpkgs wrapping platformio in bwrap, which fails
|
# platformio to use platformio-core instead of the FHS-wrapped version.
|
||||||
|
# This avoids nixpkgs wrapping platformio in bwrap, which fails
|
||||||
# on CI runners that disallow unprivileged user namespaces.
|
# on CI runners that disallow unprivileged user namespaces.
|
||||||
ci = pkgs.mkShell {
|
ci = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
python3
|
(esphome.override { platformio = platformio-core; })
|
||||||
python3Packages.pipx
|
|
||||||
esptool
|
esptool
|
||||||
gnumake
|
gnumake
|
||||||
];
|
];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
pipx install --quiet esphome==${pkgs.esphome.version}
|
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
|
||||||
echo -n "ESPHome (CI) "
|
echo -n "ESPHome (CI) "
|
||||||
esphome --version
|
esphome --version
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user