diff --git a/.github/workflows/linux_checks.yml b/.github/workflows/linux_checks.yml index 0f489ea71..e93163e39 100644 --- a/.github/workflows/linux_checks.yml +++ b/.github/workflows/linux_checks.yml @@ -7,26 +7,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up python - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - name: Set up protoc - uses: Arduino/actions/setup-protoc@master - - name: Set up node - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: Set up ripgrep, pyaudio, gettext, rename - run: | - 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 ~/.cache permissions @@ -52,6 +32,26 @@ jobs: with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + - name: Cache pyenv + uses: actions/cache@v1 + with: + path: ${{ github.workspace }}/pyenv + key: ${{ runner.os }}-pyenv-${{ hashFiles('**/Makefile') }}-${{ hashFiles('**/requirements.txt') }}- + - name: Set up python + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Set up protoc + uses: Arduino/actions/setup-protoc@master + - name: Set up node + uses: actions/setup-node@v1 + with: + node-version: 12 + - name: Set up ripgrep, pyaudio, gettext, rename + run: | + sudo apt update + sudo apt install portaudio19-dev gettext rename + sudo snap install ripgrep --classic - name: Run checks run: | export RSPY_TARGET_DIR=~/target @@ -65,5 +65,5 @@ jobs: - name: Upload python wheels uses: actions/upload-artifact@v1 with: - name: Linux python wheels + name: linux_python_wheels path: dist diff --git a/.github/workflows/mac_checks.yml.off b/.github/workflows/mac_checks.yml.off index 0055144fe..b5d324475 100644 --- a/.github/workflows/mac_checks.yml.off +++ b/.github/workflows/mac_checks.yml.off @@ -9,26 +9,6 @@ jobs: runs-on: macOS-latest steps: - uses: actions/checkout@v2 - - name: Set up python - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - name: Set up protoc - uses: Arduino/actions/setup-protoc@master - - name: Set up node - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: Set up brew packages - 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: @@ -49,6 +29,25 @@ jobs: with: path: ~/Library/Caches/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + - name: Cache pyenv + uses: actions/cache@v1 + with: + path: ${{ github.workspace }}/pyenv + key: ${{ runner.os }}-pyenv-${{ hashFiles('**/Makefile') }}-${{ hashFiles('**/requirements.txt') }}- + - name: Set up python + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Set up protoc + uses: Arduino/actions/setup-protoc@master + - name: Set up node + uses: actions/setup-node@v1 + with: + node-version: 12 + - name: Set up brew packages + run: | + brew install portaudio protobuf gettext rename ripgrep + brew link gettext --force - name: Run checks run: | export RSPY_TARGET_DIR=~/target @@ -62,5 +61,5 @@ jobs: - name: Upload python wheels uses: actions/upload-artifact@v1 with: - name: Mac OS python wheels + name: mac_os_python_wheels path: dist diff --git a/.github/workflows/windows_checks.yml b/.github/workflows/windows_checks.yml index dd82de5f8..0eac083c3 100644 --- a/.github/workflows/windows_checks.yml +++ b/.github/workflows/windows_checks.yml @@ -23,14 +23,33 @@ jobs: 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 + - 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: ${{ github.workspace }}\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: Cache pacman + uses: actions/cache@v1 + id: cache-pacman with: path: C:\Program Files\Git key: ${{ runner.os }}-pacman-${{ hashFiles('**/windows_checks.yml') }} @@ -78,26 +97,6 @@ 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: ${{ github.workspace }}\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: Run checks shell: cmd run: | @@ -115,5 +114,5 @@ jobs: - name: Upload python wheels uses: actions/upload-artifact@v1 with: - name: Windows python wheels + name: windows_python_wheels path: dist