forked from lix-project/lix-installer
Get repeated install working in CI
This commit is contained in:
parent
71e63da4e4
commit
a7ab480eea
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -101,6 +101,10 @@ jobs:
|
||||||
run: sudo RUST_LOG=harmonic=trace RUST_BACKTRACE=full ./harmonic uninstall --no-confirm
|
run: sudo RUST_LOG=harmonic=trace RUST_BACKTRACE=full ./harmonic uninstall --no-confirm
|
||||||
- name: Repeated install
|
- name: Repeated install
|
||||||
run: sudo RUST_LOG=harmonic=trace RUST_BACKTRACE=full ./harmonic install linux-multi --no-confirm
|
run: sudo RUST_LOG=harmonic=trace RUST_BACKTRACE=full ./harmonic install linux-multi --no-confirm
|
||||||
|
- name: Repeated test run
|
||||||
|
run: |
|
||||||
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
|
nix run nixpkgs#fortune
|
||||||
- name: Repeated uninstall
|
- name: Repeated uninstall
|
||||||
run: sudo RUST_LOG=harmonic=trace RUST_BACKTRACE=full ./harmonic uninstall --no-confirm
|
run: sudo RUST_LOG=harmonic=trace RUST_BACKTRACE=full ./harmonic uninstall --no-confirm
|
||||||
|
|
||||||
|
@ -140,6 +144,10 @@ jobs:
|
||||||
run: sudo RUST_LOG=harmonic=trace RUST_BACKTRACE=full ./harmonic uninstall --no-confirm
|
run: sudo RUST_LOG=harmonic=trace RUST_BACKTRACE=full ./harmonic uninstall --no-confirm
|
||||||
- name: Repeated install
|
- name: Repeated install
|
||||||
run: sudo RUST_LOG=harmonic=trace RUST_BACKTRACE=full ./harmonic install darwin-multi --no-confirm
|
run: sudo RUST_LOG=harmonic=trace RUST_BACKTRACE=full ./harmonic install darwin-multi --no-confirm
|
||||||
|
- name: Repeated test run
|
||||||
|
run: |
|
||||||
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
|
nix run nixpkgs#fortune
|
||||||
- name: Repeated uninstall
|
- name: Repeated uninstall
|
||||||
run: sudo RUST_LOG=harmonic=trace RUST_BACKTRACE=full ./harmonic uninstall --no-confirm
|
run: sudo RUST_LOG=harmonic=trace RUST_BACKTRACE=full ./harmonic uninstall --no-confirm
|
||||||
|
|
|
@ -132,6 +132,15 @@ impl Action for ConfigureNixDaemonService {
|
||||||
execute_command(Command::new("systemctl").arg("daemon-reload"))
|
execute_command(Command::new("systemctl").arg("daemon-reload"))
|
||||||
.await
|
.await
|
||||||
.map_err(|e| ConfigureNixDaemonServiceError::Command(e).boxed())?;
|
.map_err(|e| ConfigureNixDaemonServiceError::Command(e).boxed())?;
|
||||||
|
|
||||||
|
execute_command(
|
||||||
|
Command::new("systemctl")
|
||||||
|
.arg("enable")
|
||||||
|
.arg("--now")
|
||||||
|
.arg("nix-daemon.socket"),
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
.map_err(|e| ConfigureNixDaemonServiceError::Command(e).boxed())?;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -181,11 +190,11 @@ impl Action for ConfigureNixDaemonService {
|
||||||
.map_err(|e| ConfigureNixDaemonServiceError::Command(e).boxed())?;
|
.map_err(|e| ConfigureNixDaemonServiceError::Command(e).boxed())?;
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
execute_command(Command::new("systemctl").args(["disable", SOCKET_SRC]))
|
execute_command(Command::new("systemctl").args(["disable", SOCKET_SRC, "--now"]))
|
||||||
.await
|
.await
|
||||||
.map_err(|e| ConfigureNixDaemonServiceError::Command(e).boxed())?;
|
.map_err(|e| ConfigureNixDaemonServiceError::Command(e).boxed())?;
|
||||||
|
|
||||||
execute_command(Command::new("systemctl").args(["disable", SERVICE_SRC]))
|
execute_command(Command::new("systemctl").args(["disable", SERVICE_SRC, "--now"]))
|
||||||
.await
|
.await
|
||||||
.map_err(|e| ConfigureNixDaemonServiceError::Command(e).boxed())?;
|
.map_err(|e| ConfigureNixDaemonServiceError::Command(e).boxed())?;
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,11 @@ impl Action for StartSystemdUnit {
|
||||||
tracing::debug!("Stopping systemd unit");
|
tracing::debug!("Stopping systemd unit");
|
||||||
|
|
||||||
// TODO(@Hoverbear): Handle proxy vars
|
// TODO(@Hoverbear): Handle proxy vars
|
||||||
execute_command(Command::new("systemctl").arg("stop").arg(format!("{unit}")))
|
execute_command(
|
||||||
|
Command::new("systemctl")
|
||||||
|
.arg("disable")
|
||||||
|
.arg(format!("{unit}")),
|
||||||
|
)
|
||||||
.await
|
.await
|
||||||
.map_err(|e| StartSystemdUnitError::Command(e).boxed())?;
|
.map_err(|e| StartSystemdUnitError::Command(e).boxed())?;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ impl Planner for LinuxMulti {
|
||||||
Box::new(CreateDirectory::plan("/nix", None, None, 0o0755, true).await?),
|
Box::new(CreateDirectory::plan("/nix", None, None, 0o0755, true).await?),
|
||||||
Box::new(ProvisionNix::plan(self.settings.clone()).await?),
|
Box::new(ProvisionNix::plan(self.settings.clone()).await?),
|
||||||
Box::new(ConfigureNix::plan(self.settings).await?),
|
Box::new(ConfigureNix::plan(self.settings).await?),
|
||||||
Box::new(StartSystemdUnit::plan("nix-daemon.socket".into()).await?),
|
// Box::new(StartSystemdUnit::plan("nix-daemon.socket".into()).await?),
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue