mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Cache pacman package manager and upload python wheels
This commit is contained in:
parent
f908566252
commit
4ff6e35a2c
3 changed files with 42 additions and 2 deletions
15
.github/workflows/linux_checks.yml
vendored
15
.github/workflows/linux_checks.yml
vendored
|
@ -22,10 +22,16 @@ jobs:
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install portaudio19-dev gettext rename
|
sudo apt install portaudio19-dev gettext rename
|
||||||
sudo snap install ripgrep --classic
|
sudo snap install ripgrep --classic
|
||||||
|
- name: Cache pyenv
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/pyenv
|
||||||
|
key: ${{ runner.os }}-pyenv-${{ hashFiles('**/Makefile') }}-${{ hashFiles('**/requirements.txt') }}-
|
||||||
# Necessary for now for the cargo cache:
|
# Necessary for now for the cargo cache:
|
||||||
# https://github.com/actions/cache/issues/133#issuecomment-599102035
|
# https://github.com/actions/cache/issues/133#issuecomment-599102035
|
||||||
- name: Fix ~/.cargo directory permissions
|
- name: Fix ~/.cache permissions
|
||||||
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
|
run: |
|
||||||
|
sudo chown -R $(whoami):$(id -ng) ~/.cargo/
|
||||||
- name: Cache cargo registry
|
- name: Cache cargo registry
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
|
@ -56,3 +62,8 @@ jobs:
|
||||||
export RSPY_TARGET_DIR=~/target
|
export RSPY_TARGET_DIR=~/target
|
||||||
export CARGO_TARGET_DIR=~/target
|
export CARGO_TARGET_DIR=~/target
|
||||||
make build BUILDFLAGS=""
|
make build BUILDFLAGS=""
|
||||||
|
- name: Upload python wheels
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: Linux python wheels
|
||||||
|
path: dist
|
||||||
|
|
11
.github/workflows/mac_checks.yml
vendored
11
.github/workflows/mac_checks.yml
vendored
|
@ -27,6 +27,12 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
brew install portaudio protobuf gettext rename ripgrep
|
brew install portaudio protobuf gettext rename ripgrep
|
||||||
brew link gettext --force
|
brew link gettext --force
|
||||||
|
- name: Cache pyenv
|
||||||
|
id: cache-pyenv
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/pyenv
|
||||||
|
key: ${{ runner.os }}-pyenv-${{ hashFiles('**/Makefile') }}-${{ hashFiles('**/requirements.txt') }}-
|
||||||
- name: Cache cargo registry
|
- name: Cache cargo registry
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
|
@ -57,3 +63,8 @@ jobs:
|
||||||
export RSPY_TARGET_DIR=~/target
|
export RSPY_TARGET_DIR=~/target
|
||||||
export CARGO_TARGET_DIR=~/target
|
export CARGO_TARGET_DIR=~/target
|
||||||
make build BUILDFLAGS=""
|
make build BUILDFLAGS=""
|
||||||
|
- name: Upload python wheels
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: Mac OS python wheels
|
||||||
|
path: dist
|
||||||
|
|
18
.github/workflows/windows_checks.yml
vendored
18
.github/workflows/windows_checks.yml
vendored
|
@ -22,7 +22,20 @@ jobs:
|
||||||
echo "::set-env name=SCOOP::$env:GITHUB_WORKSPACE"
|
echo "::set-env name=SCOOP::$env:GITHUB_WORKSPACE"
|
||||||
echo "::set-env name=SCOOP_GLOBAL::$env:GITHUB_WORKSPACE\"
|
echo "::set-env name=SCOOP_GLOBAL::$env:GITHUB_WORKSPACE\"
|
||||||
echo "::set-env name=ANKI_EXTRA_PIP::python -m pip install $pyaudio"
|
echo "::set-env name=ANKI_EXTRA_PIP::python -m pip install $pyaudio"
|
||||||
|
- name: Cache pyenv
|
||||||
|
id: cache-pyenv
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}\pyenv
|
||||||
|
key: ${{ runner.os }}-pyenv-${{ hashFiles('**/Makefile') }}-${{ hashFiles('**/requirements.txt') }}-
|
||||||
|
- name: Cache pacman
|
||||||
|
id: cache-pacman
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: C:\Program Files\Git
|
||||||
|
key: ${{ runner.os }}-pacman-${{ hashFiles('**/windows_checks.yml') }}
|
||||||
- name: Set up pacman, pyaudio, rsync, rename
|
- name: Set up pacman, pyaudio, rsync, rename
|
||||||
|
if: steps.cache-pacman.outputs.cache-hit != 'true'
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
echo on
|
echo on
|
||||||
|
@ -99,3 +112,8 @@ jobs:
|
||||||
set "RSPY_TARGET_DIR=%GITHUB_WORKSPACE%\target"
|
set "RSPY_TARGET_DIR=%GITHUB_WORKSPACE%\target"
|
||||||
set "CARGO_TARGET_DIR=%GITHUB_WORKSPACE%\target"
|
set "CARGO_TARGET_DIR=%GITHUB_WORKSPACE%\target"
|
||||||
make build BUILDFLAGS=""
|
make build BUILDFLAGS=""
|
||||||
|
- name: Upload python wheels
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: Windows python wheels
|
||||||
|
path: dist
|
||||||
|
|
Loading…
Reference in a new issue