Moved RSPY_TARGET_DIR and CARGO_TARGET_DIR to the top

This commit is contained in:
evandrocoan 2020-03-26 03:04:47 -03:00
parent 8b8be3e3f3
commit 1e40103325

View file

@ -51,20 +51,22 @@ jobs:
# echo "::set-env name=SHELLFLAGS::-x" # echo "::set-env name=SHELLFLAGS::-x"
echo "::set-env name=BUILDFLAGS::" echo "::set-env name=BUILDFLAGS::"
# Update make to use the new `.SHELLFLAGS` feature
# https://stackoverflow.com/questions/43175529/updating-make-version-4-1-on-mac
echo "::set-env name=PATH::/usr/local/opt/make/libexec/gnubin:$PATH"
# Disabled for Mac OS because it was not reusing the cached files # Disabled for Mac OS because it was not reusing the cached files
# https://github.com/ankitects/anki/pull/528 # https://github.com/ankitects/anki/pull/528
# echo "::set-env name=RSPY_TARGET_DIR::${GITHUB_WORKSPACE}/target" # echo "::set-env name=RSPY_TARGET_DIR::${GITHUB_WORKSPACE}/target"
# echo "::set-env name=CARGO_TARGET_DIR::${GITHUB_WORKSPACE}/target" # echo "::set-env name=CARGO_TARGET_DIR::${GITHUB_WORKSPACE}/target"
# Update make to use the new `.SHELLFLAGS` feature
# https://stackoverflow.com/questions/43175529/updating-make-version-4-1-on-mac
echo "::set-env name=PATH::/usr/local/opt/make/libexec/gnubin:$PATH"
- name: Configure Windows environment variables - name: Configure Windows environment variables
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
run: | run: |
# echo "::set-env name=SHELLFLAGS::-x" # echo "::set-env name=SHELLFLAGS::-x"
echo "::set-env name=BUILDFLAGS::" echo "::set-env name=BUILDFLAGS::"
echo "::set-env name=RSPY_TARGET_DIR::$env:GITHUB_WORKSPACE\target"
echo "::set-env name=CARGO_TARGET_DIR::$env:GITHUB_WORKSPACE\target"
$pyaudio=("PyAudio-0.2.11-cp37-cp37m-win_amd64.whl") $pyaudio=("PyAudio-0.2.11-cp37-cp37m-win_amd64.whl")
$new_path=("$env:GITHUB_WORKSPACE;$env:PATH") $new_path=("$env:GITHUB_WORKSPACE;$env:PATH")
@ -79,8 +81,6 @@ 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"
echo "::set-env name=RSPY_TARGET_DIR::$env:GITHUB_WORKSPACE\target"
echo "::set-env name=CARGO_TARGET_DIR::$env:GITHUB_WORKSPACE\target"
# 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
@ -174,7 +174,7 @@ jobs:
pacman -Sccv --noconfirm pacman -Sccv --noconfirm
pacman -Qsv --noconfirm pacman -Qsv --noconfirm
- name: Set up pyaudio, rename - name: Set up curl pyaudio, rename
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
shell: cmd shell: cmd
run: | run: |
@ -182,7 +182,7 @@ jobs:
curl -LO https://download.lfd.uci.edu/pythonlibs/s2jqpv5t/%pyaudio% curl -LO https://download.lfd.uci.edu/pythonlibs/s2jqpv5t/%pyaudio%
curl -LO https://raw.githubusercontent.com/subogero/rename/master/rename curl -LO https://raw.githubusercontent.com/subogero/rename/master/rename
- name: Set up scoop, gettext, ripgrep - name: Set up Windows scoop, gettext, ripgrep
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
shell: cmd shell: cmd
run: | run: |
@ -190,14 +190,14 @@ jobs:
powershell -executionpolicy bypass "& Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')" powershell -executionpolicy bypass "& Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')"
scoop install -g gettext ripgrep scoop install -g gettext ripgrep
- name: Set up ripgrep, pyaudio, gettext, rename - name: Set up Ubuntu ripgrep, pyaudio, gettext, rename
if: matrix.os == 'ubuntu-latest' if: matrix.os == 'ubuntu-latest'
run: | run: |
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: Set up brew packages - name: Set up brew ripgrep, pyaudio, gettext, rename
if: matrix.os == 'macos-latest' if: matrix.os == 'macos-latest'
run: | run: |
brew install portaudio protobuf gettext rename ripgrep make brew install portaudio protobuf gettext rename ripgrep make