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:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
APT_CACHE_DIR: ${{ github.workspace }}/.cache/apt/archives
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
|
|
@ -21,15 +23,11 @@ jobs:
|
||||||
- name: Cache apt packages
|
- name: Cache apt packages
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: /var/cache/apt/archives
|
path: .cache/apt
|
||||||
key: ${{ runner.os }}-apt-${{ hashFiles('.github/workflows/test.yml') }}
|
key: ${{ runner.os }}-apt-${{ hashFiles('Makefile') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-apt-
|
${{ runner.os }}-apt-
|
||||||
- name: Bootstrap
|
- name: Bootstrap
|
||||||
run: make 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
|
- name: Run tests
|
||||||
run: make
|
run: make
|
||||||
|
|
|
||||||
10
Makefile
10
Makefile
|
|
@ -2,7 +2,15 @@ default: c ruby
|
||||||
|
|
||||||
bootstrap:
|
bootstrap:
|
||||||
@if command -v apt-get >/dev/null 2>&1; then \
|
@if command -v apt-get >/dev/null 2>&1; then \
|
||||||
sudo apt-get update && sudo apt-get install -y libreadline-dev; \
|
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 \
|
elif command -v brew >/dev/null 2>&1; then \
|
||||||
brew list readline >/dev/null 2>&1 || brew install readline; \
|
brew list readline >/dev/null 2>&1 || brew install readline; \
|
||||||
else \
|
else \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue