mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Cache rust libraries
This commit is contained in:
parent
20c9837770
commit
b5a1cf3a14
3 changed files with 68 additions and 11 deletions
41
.github/workflows/linux_checks.yml
vendored
41
.github/workflows/linux_checks.yml
vendored
|
@ -17,11 +17,42 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
- name: Run checks
|
||||
- name: Set up ripgrep, pyaudio, gettext, rename
|
||||
run: |
|
||||
# add requirements
|
||||
sudo apt update; sudo apt install portaudio19-dev gettext rename
|
||||
sudo snap install ripgrep --classic
|
||||
export CARGO_TARGET_DIR=~/target
|
||||
export RSPY_TARGET_DIR=~/target
|
||||
make check build BUILDFLAGS=""
|
||||
# Necessary for now for the cargo cache:
|
||||
# https://github.com/actions/cache/issues/133#issuecomment-599102035
|
||||
- name: Fix ~/.cargo directory permissions
|
||||
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
|
||||
- name: Cache cargo index
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/git
|
||||
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
|
||||
- name: Cache cargo build
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/target
|
||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
|
||||
- name: Cache pip wheels
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
- name: Configure project variables
|
||||
run: |
|
||||
echo "::set-env name=BUILDFLAGS::"
|
||||
echo "::set-env name=RSPY_TARGET_DIR::~/target"
|
||||
echo "::set-env name=CARGO_TARGET_DIR::~/target"
|
||||
- name: Run checks
|
||||
run: |
|
||||
make check
|
||||
- name: Run build
|
||||
run: |
|
||||
make build
|
||||
|
|
35
.github/workflows/windows_checks.yml
vendored
35
.github/workflows/windows_checks.yml
vendored
|
@ -65,12 +65,37 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: C:\Rust\.cargo\registry
|
||||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
|
||||
- name: Cache cargo index
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: C:\Rust\.cargo\git
|
||||
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
|
||||
- name: Cache cargo build
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~\target
|
||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
|
||||
- name: Cache pip wheels
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~\AppData\Local\pip\Cache
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
- name: Configure project variables
|
||||
run: |
|
||||
echo "::set-env name=RSPY_TARGET_DIR::~\target"
|
||||
echo "::set-env name=CARGO_TARGET_DIR::~\target"
|
||||
- name: Run checks
|
||||
shell: cmd
|
||||
run: |
|
||||
echo on
|
||||
set "RSPY_TARGET_DIR=%GITHUB_WORKSPACE%\target"
|
||||
set "CARGO_TARGET_DIR=%GITHUB_WORKSPACE%\target"
|
||||
set "BUILDFLAGS="
|
||||
:: set "SHELLFLAGS=-x"
|
||||
make check build
|
||||
make check BUILDFLAGS=""
|
||||
- name: Run build
|
||||
shell: cmd
|
||||
run: |
|
||||
echo on
|
||||
make build BUILDFLAGS=""
|
||||
|
|
1
Makefile
1
Makefile
|
@ -181,3 +181,4 @@ push-i18n-ftl: pull-i18n
|
|||
.PHONY: push-i18n-po
|
||||
push-i18n-po: pull-i18n
|
||||
(cd qt/po && scripts/upload-latest-template)
|
||||
|
||||
|
|
Loading…
Reference in a new issue