mirror of
https://github.com/samsonjs/csc360-a1-shell.git
synced 2026-03-25 08:45:52 +00:00
ok fam
This commit is contained in:
parent
b29a1d5ff7
commit
4dbbc767a4
2 changed files with 13 additions and 7 deletions
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
|
|
@ -9,6 +9,8 @@ on:
|
|||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
APT_CACHE_DIR: ${{ github.workspace }}/.cache/apt/archives
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Set up Ruby
|
||||
|
|
@ -21,15 +23,11 @@ jobs:
|
|||
- name: Cache apt packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /var/cache/apt/archives
|
||||
key: ${{ runner.os }}-apt-${{ hashFiles('.github/workflows/test.yml') }}
|
||||
path: .cache/apt
|
||||
key: ${{ runner.os }}-apt-${{ hashFiles('Makefile') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-apt-
|
||||
- name: Bootstrap
|
||||
run: make bootstrap
|
||||
- name: Prepare apt cache
|
||||
run: |
|
||||
sudo rm -f /var/cache/apt/archives/lock
|
||||
sudo chmod -R a+rX /var/cache/apt/archives
|
||||
- name: Run tests
|
||||
run: make
|
||||
|
|
|
|||
8
Makefile
8
Makefile
|
|
@ -2,7 +2,15 @@ default: c ruby
|
|||
|
||||
bootstrap:
|
||||
@if command -v apt-get >/dev/null 2>&1; then \
|
||||
if [ -n "$$APT_CACHE_DIR" ]; then \
|
||||
mkdir -p "$$APT_CACHE_DIR/partial"; \
|
||||
sudo apt-get update && sudo apt-get install -y \
|
||||
-o Dir::Cache::archives="$$APT_CACHE_DIR" \
|
||||
-o Dir::Cache::archives::partial="$$APT_CACHE_DIR/partial" \
|
||||
libreadline-dev; \
|
||||
else \
|
||||
sudo apt-get update && sudo apt-get install -y libreadline-dev; \
|
||||
fi; \
|
||||
elif command -v brew >/dev/null 2>&1; then \
|
||||
brew list readline >/dev/null 2>&1 || brew install readline; \
|
||||
else \
|
||||
|
|
|
|||
Loading…
Reference in a new issue