Skip to content

Commit

Permalink
Adds additional caching steps to speed up the CI process (#9254)
Browse files Browse the repository at this point in the history
* Adds additional caching steps to speed up the CI process

* Names the BYOND cache step
  • Loading branch information
Crossedfall authored Jun 18, 2023
1 parent 5d9e7fc commit b40d42a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
42 changes: 39 additions & 3 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Setup cache
cache: 'pip'
- name: Cache SpacemanDMM
id: cache-spacemandmm
uses: actions/cache@v3
with:
Expand All @@ -35,8 +36,17 @@ jobs:
run: |
pip install setuptools
bash tools/ci/install_node.sh
bash tools/ci/install_auxmos.sh
pip install -r tools/requirements.txt
- name: Cache Yarn
id: cache-yarn
uses: actions/cache@v3
with:
path: tgui/.yarn
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('tgui/yarn.lock') }}
- name: TGUI fetch
if: steps.cache-yarn.outputs.cache-hit != 'true'
run: |
tools/build/build --ci yarn
- name: Run Linters
run: |
bash tools/ci/check_filedirs.sh beestation.dme
Expand Down Expand Up @@ -78,7 +88,7 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3
- name: Setup cache
- name: Cache BYOND
id: cache-byond
uses: actions/cache@v3
with:
Expand All @@ -101,6 +111,16 @@ jobs:
- name: Install auxmos
run: |
bash tools/ci/install_auxmos.sh
- name: Cache Yarn
id: cache-yarn
uses: actions/cache@v3
with:
path: tgui/.yarn
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('tgui/yarn.lock') }}
- name: TGUI fetch
if: steps.cache-yarn.outputs.cache-hit != 'true'
run: |
tools/build/build --ci yarn
- name: Compile and run tests
run: |
source $HOME/BYOND/byond/bin/byondsetup
Expand All @@ -110,6 +130,22 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Cache Yarn
id: cache-yarn
uses: actions/cache@v3
with:
path: tgui/.yarn
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('tgui/yarn.lock') }}
- name: Cache BYOND
id: cache-byond
uses: actions/cache@v3
with:
path: C:/byond
key: ${{ runner.os }}-byond-cache-${{ hashFiles('dependencies.sh') }}
- name: TGUI fetch
if: steps.cache-yarn.outputs.cache-hit != 'true'
run: |
tools/build/build --ci yarn
- name: Compile
run: pwsh tools/ci/build.ps1
env:
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/check_grep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ while read f; do
echo -e "${RED}ERROR: file $f is missing a trailing newline${NC}"
st=1
fi;
done < <(find . -type f -not \( -path "./.git/*" -prune \) -exec grep -Iq . {} \; -print)
done < <(find . -type f -not \( -path "./.git/*" -prune \) -not \( -path "./tgui/.yarn/*" -prune \) -exec grep -Iq . {} \; -print)

if [ $st = 0 ]; then
echo
Expand Down

0 comments on commit b40d42a

Please sign in to comment.