Cache pacman package manager and upload python wheels

This commit is contained in:
evandrocoan 2020-03-23 11:50:17 -03:00
parent f908566252
commit 4ff6e35a2c
3 changed files with 42 additions and 2 deletions

View file

@ -22,10 +22,16 @@ jobs:
sudo apt update
sudo apt install portaudio19-dev gettext rename
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:
# https://github.com/actions/cache/issues/133#issuecomment-599102035
- name: Fix ~/.cargo directory permissions
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
- name: Fix ~/.cache permissions
run: |
sudo chown -R $(whoami):$(id -ng) ~/.cargo/
- name: Cache cargo registry
uses: actions/cache@v1
with:
@ -56,3 +62,8 @@ jobs:
export RSPY_TARGET_DIR=~/target
export CARGO_TARGET_DIR=~/target
make build BUILDFLAGS=""
- name: Upload python wheels
uses: actions/upload-artifact@v1
with:
name: Linux python wheels
path: dist

View file

@ -27,6 +27,12 @@ jobs:
run: |
brew install portaudio protobuf gettext rename ripgrep
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
uses: actions/cache@v1
with:
@ -57,3 +63,8 @@ jobs:
export RSPY_TARGET_DIR=~/target
export CARGO_TARGET_DIR=~/target
make build BUILDFLAGS=""
- name: Upload python wheels
uses: actions/upload-artifact@v1
with:
name: Mac OS python wheels
path: dist

View file

@ -22,7 +22,20 @@ jobs:
echo "::set-env name=SCOOP::$env:GITHUB_WORKSPACE"
echo "::set-env name=SCOOP_GLOBAL::$env:GITHUB_WORKSPACE\"
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
if: steps.cache-pacman.outputs.cache-hit != 'true'
shell: cmd
run: |
echo on
@ -99,3 +112,8 @@ jobs:
set "RSPY_TARGET_DIR=%GITHUB_WORKSPACE%\target"
set "CARGO_TARGET_DIR=%GITHUB_WORKSPACE%\target"
make build BUILDFLAGS=""
- name: Upload python wheels
uses: actions/upload-artifact@v1
with:
name: Windows python wheels
path: dist