This commit is contained in:
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@@ -12,6 +12,9 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ubuntu:24.04
|
||||||
|
options: --privileged --cap-add=SYS_ADMIN
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
|||||||
@@ -170,7 +170,8 @@ impl UnshareDriver {
|
|||||||
|
|
||||||
cmd.envs(env.iter().cloned());
|
cmd.envs(env.iter().cloned());
|
||||||
|
|
||||||
cmd.arg("--pid")
|
cmd.arg("--mount-proc")
|
||||||
|
.arg("--pid")
|
||||||
.arg("--ipc")
|
.arg("--ipc")
|
||||||
.arg("--uts")
|
.arg("--uts")
|
||||||
.arg("--map-auto")
|
.arg("--map-auto")
|
||||||
|
|||||||
@@ -149,7 +149,6 @@ pub fn setup_environment(
|
|||||||
env: &mut HashMap<String, String>,
|
env: &mut HashMap<String, String>,
|
||||||
arch: &str,
|
arch: &str,
|
||||||
) -> Result<(), Box<dyn Error>> {
|
) -> Result<(), Box<dyn Error>> {
|
||||||
log::debug!("Running 'dpkg-architecture -a{}'", arch);
|
|
||||||
let dpkg_architecture = String::from_utf8(
|
let dpkg_architecture = String::from_utf8(
|
||||||
context::current()
|
context::current()
|
||||||
.command("dpkg-architecture")
|
.command("dpkg-architecture")
|
||||||
@@ -157,7 +156,6 @@ pub fn setup_environment(
|
|||||||
.output()?
|
.output()?
|
||||||
.stdout,
|
.stdout,
|
||||||
)?;
|
)?;
|
||||||
log::debug!("dpkg-architecture done");
|
|
||||||
let env_var_regex = regex::Regex::new(r"(?<key>.*)=(?<value>.*)").unwrap();
|
let env_var_regex = regex::Regex::new(r"(?<key>.*)=(?<value>.*)").unwrap();
|
||||||
for l in dpkg_architecture.lines() {
|
for l in dpkg_architecture.lines() {
|
||||||
let capture = env_var_regex.captures(l).unwrap();
|
let capture = env_var_regex.captures(l).unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user