Merge pull request #3331 from myk002/myk_cache_conscious

reduce ccache, protect steam sdk from eviction, clean up GHA defs
develop
Myk 2023-05-02 09:56:12 -07:00 committed by GitHub
commit f87ed93000
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 17 deletions

@ -72,6 +72,12 @@ jobs:
# - name: Download DF # - name: Download DF
# run: | # run: |
# sh ci/download-df.sh # sh ci/download-df.sh
- name: Restore steam SDK
uses: actions/cache@v3
with:
path: depends/steam
key: steam-sdk-156
enableCrossOsArchive: true
- name: Configure DFHack - name: Configure DFHack
env: env:
CC: gcc-${{ matrix.gcc }} CC: gcc-${{ matrix.gcc }}
@ -94,6 +100,8 @@ jobs:
- name: Build DFHack - name: Build DFHack
run: | run: |
ninja -C build-ci install ninja -C build-ci install
ccache --max-size 50M
ccache --cleanup
ccache --show-stats ccache --show-stats
- name: Run cpp unit tests - name: Run cpp unit tests
id: run_tests_cpp id: run_tests_cpp
@ -128,6 +136,10 @@ jobs:
name: Build MSVC win64 name: Build MSVC win64
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install ccache
- name: Clone DFHack - name: Clone DFHack
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
@ -147,6 +159,9 @@ jobs:
run: | run: |
cd build cd build
bash -x build-win64-from-linux.sh bash -x build-win64-from-linux.sh
ccache -d win64-cross/ccache --max-size 200M
ccache -d win64-cross/ccache --cleanup
ccache -d win64-cross/ccache --show-stats
- name: Format artifact name - name: Format artifact name
id: artifactname id: artifactname
run: | run: |
@ -174,11 +189,6 @@ jobs:
- name: Build docs - name: Build docs
run: | run: |
sphinx-build -W --keep-going -j auto --color . docs/html sphinx-build -W --keep-going -j auto --color . docs/html
- name: Upload docs
uses: actions/upload-artifact@v1
with:
name: docs
path: docs/html
lint: lint:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
@ -187,10 +197,6 @@ jobs:
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: 3 python-version: 3
- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install Lua - name: Install Lua
run: | run: |
sudo apt-get update sudo apt-get update
@ -215,10 +221,6 @@ jobs:
if: success() || failure() if: success() || failure()
run: | run: |
python ci/script-syntax.py --ext=lua --cmd="luac5.3 -p" --github-actions python ci/script-syntax.py --ext=lua --cmd="luac5.3 -p" --github-actions
- name: Check Ruby syntax
if: success() || failure()
run: |
python ci/script-syntax.py --ext=rb --cmd="ruby -c" --github-actions
check-pr: check-pr:
runs-on: ubuntu-latest runs-on: ubuntu-latest

@ -14,14 +14,18 @@ on:
release_channel: release_channel:
description: Release channel description: Release channel
type: string type: string
required: false required: true
default: beta default: staging
jobs: jobs:
deploy-to-steam: deploy-to-steam:
name: Deploy to Steam name: Deploy to Steam
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install ccache
- name: Clone DFHack - name: Clone DFHack
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
@ -34,12 +38,12 @@ jobs:
path: build/win64-cross/ccache path: build/win64-cross/ccache
key: ccache-win64-cross-msvc-${{ github.event.inputs.commit_hash }} key: ccache-win64-cross-msvc-${{ github.event.inputs.commit_hash }}
restore-keys: | restore-keys: |
ccache-win64-cross-msvc-develop-${{ github.event.inputs.commit_hash }} ccache-win64-cross-msvc-${{ github.event.inputs.commit_hash }}
ccache-win64-cross-msvc ccache-win64-cross-msvc
- name: Restore steam SDK - name: Restore steam SDK
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: depends/steam/steamworks_sdk_156.zip path: depends/steam
key: steam-sdk-156 key: steam-sdk-156
enableCrossOsArchive: true enableCrossOsArchive: true
- name: Cross-compile win64 artifacts - name: Cross-compile win64 artifacts
@ -54,6 +58,9 @@ jobs:
echo echo
cd build cd build
bash -x build-win64-from-linux.sh bash -x build-win64-from-linux.sh
ccache -d win64-cross/ccache --max-size 200M
ccache -d win64-cross/ccache --cleanup
ccache -d win64-cross/ccache --show-stats
- name: Steam deploy - name: Steam deploy
uses: game-ci/steam-deploy@v2 uses: game-ci/steam-deploy@v2
with: with: