Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
ysawa0 committed May 12, 2024
1 parent d13fb16 commit 33dbbc1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
with:
python-version: "3.10"

- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Cache pip dependencies
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -49,6 +52,7 @@ jobs:
- name: Install dependencies
run: |
echo "uname=$(uname)"
make setuppc
- name: Run pre-commits
Expand Down
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,25 @@ setuppc:
python3 -m pip install pre-commit
pre-commit install


ifeq ($(shell uname),Darwin)
@echo "Setting up shfmt (macOS)..."
brew install shfmt

@echo "Setting up shellcheck (macOS)..."
brew install shellcheck
else
ifeq ($(shell uname),x86_64)
@echo "Setting up shfmt (Linux)..."
wget -qO shfmt "https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_$(shell uname -m)"
SHFMT_BIN="shfmt_${SHFMT_VERSION}_linux_amd64"
wget -qO shfmt "https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/${SHFMT_BIN}"
chmod +x shfmt
sudo mv shfmt /usr/local/bin/

sudo mv shfmt /usr/local/bin/shfmt
@echo "Setting up shellcheck (Linux)..."
sudo apt-get install shellcheck || sudo yum install shellcheck || sudo dnf install shellcheck
else
@echo "Architecture not supported! Update this Makefile!"
exit 1
endif

.PHONY: reqtxt
Expand Down

0 comments on commit 33dbbc1

Please sign in to comment.