Skip to content

Commit

Permalink
chore: do not run cargo install as root
Browse files Browse the repository at this point in the history
  • Loading branch information
KnorpelSenf committed Dec 26, 2024
1 parent 0de4cbc commit 01a4635
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
]
}
},
"postCreateCommand": "mkdir -p ~/.local/share/bash-completion/completions && rustup completions bash > ~/.local/share/bash-completion/completions/rustup && rustup completions bash cargo > ~/.local/share/bash-completion/completions/cargo"
"postCreateCommand": "./build/postsetup.sh && P=~/.local/share/bash-completion/completions && mkdir -p $P && rustup completions bash > $P/rustup && rustup completions bash cargo > $P/cargo"
}
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
node-version: 22
- name: install deps
run: ./build/setup.sh
run: ./build/setup.sh && ./build/postsetup.sh
- name: Build with all default solvers (no cplex)
run: cargo build --features all_default_solvers --tests
- name: Run tests with all default solvers (no cplex)
Expand Down
7 changes: 7 additions & 0 deletions build/postsetup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

# Print commands, exit upon error
set -ex

# Install wasm-pack
cargo install wasm-pack
3 changes: 0 additions & 3 deletions build/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ DEBIAN_FRONTEND=noninteractive sudo apt-get install -y coinor-cbc coinor-libcbc-
curl -LO https://github.com/rust-or/good_lp/releases/download/cplex/cplex.bin
chmod u+x cplex.bin
./cplex.bin -f ./response.properties

# Install wasm-pack
cargo install wasm-pack

0 comments on commit 01a4635

Please sign in to comment.