Fixed bash call by bash using other bashes on the system PATH

This commit is contained in:
evandrocoan 2020-03-24 16:29:27 -03:00
parent 18aec3c713
commit bcda7ecc29
3 changed files with 47 additions and 76 deletions

View file

@ -9,6 +9,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Configure environment variables - name: Configure environment variables
run: | run: |
# echo "::set-env name=SHELLFLAGS::-x"
echo "::set-env name=BUILDFLAGS::" echo "::set-env name=BUILDFLAGS::"
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"
@ -21,37 +22,37 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ~/.cargo/registry path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache cargo index - name: Cache cargo index
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ~/.cargo/git path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache cargo target - name: Cache cargo target
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ github.workspace }}/target path: ${{ github.workspace }}/target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache cargo rslib - name: Cache cargo rslib
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ github.workspace }}/rslib/target path: ${{ github.workspace }}/rslib/target
key: ${{ runner.os }}-cargo-rslib-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-rslib-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache cargo rspy - name: Cache cargo rspy
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ github.workspace }}/rspy/target path: ${{ github.workspace }}/rspy/target
key: ${{ runner.os }}-cargo-rspy-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-rspy-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache pip wheels - name: Cache pip wheels
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ~/.cache/pip path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-3- key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-4-
- name: Cache pyenv - name: Cache pyenv
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ github.workspace }}/pyenv path: ${{ github.workspace }}/pyenv
key: ${{ runner.os }}-pyenv-${{ hashFiles('**/Makefile') }}-${{ hashFiles('**/requirements.txt') }}-3- key: ${{ runner.os }}-pyenv-${{ hashFiles('**/Makefile') }}-${{ hashFiles('**/requirements.txt') }}-4-
- name: Set up python - name: Set up python
uses: actions/setup-python@v1 uses: actions/setup-python@v1
with: with:
@ -69,18 +70,9 @@ 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: Run develop - run: make check
run: | - run: make develop
# export SHELLFLAGS=-x - run: make build
make develop
- name: Run build
run: |
# export SHELLFLAGS=-x
make build
- name: Run check
run: |
# export SHELLFLAGS=-x
make check
- name: Upload python wheels - name: Upload python wheels
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:

View file

@ -1,7 +1,5 @@
name: Mac Tests name: Mac Tests
# Disabled until Mac OS builds until this gets fixed:
# https://github.com/actions/virtual-environments/issues/602
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
@ -11,6 +9,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Configure environment variables - name: Configure environment variables
run: | run: |
# echo "::set-env name=SHELLFLAGS::-x"
echo "::set-env name=BUILDFLAGS::" echo "::set-env name=BUILDFLAGS::"
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"
@ -23,37 +22,37 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ~/.cargo/registry path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache cargo index - name: Cache cargo index
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ~/.cargo/git path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache cargo target - name: Cache cargo target
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ github.workspace }}/target path: ${{ github.workspace }}/target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache cargo rslib - name: Cache cargo rslib
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ github.workspace }}/rslib/target path: ${{ github.workspace }}/rslib/target
key: ${{ runner.os }}-cargo-rslib-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-rslib-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache cargo rspy - name: Cache cargo rspy
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ github.workspace }}/rspy/target path: ${{ github.workspace }}/rspy/target
key: ${{ runner.os }}-cargo-rspy-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-rspy-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache pip wheels - name: Cache pip wheels
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ~/Library/Caches/pip path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-3- key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-4-
- name: Cache pyenv - name: Cache pyenv
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ github.workspace }}/pyenv path: ${{ github.workspace }}/pyenv
key: ${{ runner.os }}-pyenv-${{ hashFiles('**/Makefile') }}-${{ hashFiles('**/requirements.txt') }}-3- key: ${{ runner.os }}-pyenv-${{ hashFiles('**/Makefile') }}-${{ hashFiles('**/requirements.txt') }}-4-
- name: Set up python - name: Set up python
uses: actions/setup-python@v1 uses: actions/setup-python@v1
with: with:
@ -70,18 +69,9 @@ 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: Run develop - run: make check
run: | - run: make develop
export SHELLFLAGS=-x - run: make build
make develop
- name: Run build
run: |
export SHELLFLAGS=-x
make build
- name: Run check
run: |
export SHELLFLAGS=-x
make check
- name: Upload python wheels - name: Upload python wheels
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:

View file

@ -10,6 +10,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Configure environment variables - name: Configure environment variables
run: | run: |
# echo "::set-env name=SHELLFLAGS::-x"
$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")
$new_path=("$env:GITHUB_WORKSPACE\shims;$new_path") $new_path=("$env:GITHUB_WORKSPACE\shims;$new_path")
@ -29,43 +30,43 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ github.workspace }}\pyenv path: ${{ github.workspace }}\pyenv
key: ${{ runner.os }}-pyenv-${{ hashFiles('**/Makefile') }}-${{ hashFiles('**/requirements.txt') }}-3- key: ${{ runner.os }}-pyenv-${{ hashFiles('**/Makefile') }}-${{ hashFiles('**/requirements.txt') }}-4-
- name: Cache cargo registry - name: Cache cargo registry
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: C:\Rust\.cargo\registry path: C:\Rust\.cargo\registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache cargo index - name: Cache cargo index
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: C:\Rust\.cargo\git path: C:\Rust\.cargo\git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache cargo target - name: Cache cargo target
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ github.workspace }}\target path: ${{ github.workspace }}\target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache cargo rslib - name: Cache cargo rslib
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ github.workspace }}\rslib\target path: ${{ github.workspace }}\rslib\target
key: ${{ runner.os }}-cargo-rslib-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-rslib-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache cargo rspy - name: Cache cargo rspy
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ${{ github.workspace }}\rspy\target path: ${{ github.workspace }}\rspy\target
key: ${{ runner.os }}-cargo-rspy-${{ hashFiles('**/Cargo.toml') }}-3- key: ${{ runner.os }}-cargo-rspy-${{ hashFiles('**/Cargo.toml') }}-4-
- name: Cache pip wheels - name: Cache pip wheels
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ~\AppData\Local\pip\Cache path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-3- key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-4-
- name: Cache pacman - name: Cache pacman
uses: actions/cache@v1 uses: actions/cache@v1
id: cache-pacman id: cache-pacman
with: with:
path: C:\Program Files\Git path: C:\Program Files\Git
key: ${{ runner.os }}-pacman-${{ hashFiles('**/windows_checks.yml') }}-3- key: ${{ runner.os }}-pacman-${{ hashFiles('**/windows_checks.yml') }}-4-
- name: Set up pacman, rsync - name: Set up pacman, rsync
if: steps.cache-pacman.outputs.cache-hit != 'true' if: steps.cache-pacman.outputs.cache-hit != 'true'
shell: cmd shell: cmd
@ -80,19 +81,22 @@ jobs:
7z x "%pacmankeys%" -so | 7z x -aoa -si -ttar -o"%programfiles%\Git" 7z x "%pacmankeys%" -so | 7z x -aoa -si -ttar -o"%programfiles%\Git"
:: Manually Install Pacman Binaries :: Manually Install Pacman Binaries
:: https://github.com/Alexpux/MSYS2-pacman/issues/50 :: https://github.com/Alexpux/MSYS2-pacman/issues/50
cd /d "%programfiles%\Git\usr\bin" set "PATH=%programfiles%\Git\usr\bin"
.\bash pacman-key --init bash pacman-key --init
.\bash pacman-key --populate msys2 bash pacman-key --populate msys2
.\bash pacman-key --refresh-keys bash pacman-key --refresh-keys
.\pacman -Tv pacman -Tv
.\pacman -Syyuuv --overwrite='*' pacman -Syyuuv --overwrite='*'
.\pacman -Syuuv --overwrite='*' pacman -Syuuv --overwrite='*'
.\pacman --version pacman --version
:: We must install bash first, otherwise we will have bash fork errors: :: We must install bash first, otherwise we will have bash fork errors:
:: https://github.com/evandroforks/anki/runs/524857054?check_suite_focus=true :: https://github.com/evandroforks/anki/runs/524857054?check_suite_focus=true
:: 0 [main] pacman 748 dofork: child -1 - forked process 2896 died unexpectedly :: 0 [main] pacman 748 dofork: child -1 - forked process 2896 died unexpectedly
.\pacman -Sv --noconfirm --overwrite='*' bash pacman -Sv --noconfirm --overwrite='*' bash
.\pacman -Sv --noconfirm --overwrite='*' rsync pacman -Sv --noconfirm --overwrite='*' rsync
:: clean all packages to decrease image size
pacman -Sccv --noconfirm
pacman -Qsv --noconfirm
- name: Set up pyaudio, rename - name: Set up pyaudio, rename
shell: cmd shell: cmd
run: | run: |
@ -117,24 +121,9 @@ jobs:
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: 12 node-version: 12
- name: Run develop - run: make check
shell: cmd - run: make develop
run: | - run: make build
echo on
:: set "SHELLFLAGS=-x"
make develop
- name: Run build
shell: cmd
run: |
echo on
:: set "SHELLFLAGS=-x"
make build
- name: Run check
shell: cmd
run: |
echo on
:: set "SHELLFLAGS=-x"
make check
- name: Upload python wheels - name: Upload python wheels
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with: