Added the develop rule to run first and install things

before running tests and the build to properly measure the total
time of each stage.
This commit is contained in:
evandrocoan 2020-03-23 16:13:00 -03:00
parent 19dab43aae
commit cfbd7ba108
3 changed files with 32 additions and 15 deletions

View file

@ -22,11 +22,11 @@ jobs:
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
- name: Cache cargo build
- name: Cache cargo target
uses: actions/cache@v1
with:
path: ~/target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}
- name: Cache pip wheels
uses: actions/cache@v1
with:
@ -52,18 +52,23 @@ jobs:
sudo apt update
sudo apt install portaudio19-dev gettext rename
sudo snap install ripgrep --classic
- name: Run checks
- name: Run develop
run: |
export RSPY_TARGET_DIR=~/target
export CARGO_TARGET_DIR=~/target
make check BUILDFLAGS=""
make develop BUILDFLAGS=""
- name: Run build
run: |
export RSPY_TARGET_DIR=~/target
export CARGO_TARGET_DIR=~/target
make build BUILDFLAGS=""
- name: Run check
run: |
export RSPY_TARGET_DIR=~/target
export CARGO_TARGET_DIR=~/target
make check BUILDFLAGS=""
- name: Upload python wheels
uses: actions/upload-artifact@v1
with:
name: linux_python_wheels
name: anki_linux_python_wheels
path: dist

View file

@ -19,11 +19,11 @@ jobs:
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
- name: Cache cargo build
- name: Cache cargo target
uses: actions/cache@v1
with:
path: ~/target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}
- name: Cache pip wheels
uses: actions/cache@v1
with:
@ -48,18 +48,23 @@ jobs:
run: |
brew install portaudio protobuf gettext rename ripgrep
brew link gettext --force
- name: Run checks
- name: Run develop
run: |
export RSPY_TARGET_DIR=~/target
export CARGO_TARGET_DIR=~/target
make check BUILDFLAGS=""
make develop BUILDFLAGS=""
- name: Run build
run: |
export RSPY_TARGET_DIR=~/target
export CARGO_TARGET_DIR=~/target
make build BUILDFLAGS=""
- name: Run check
run: |
export RSPY_TARGET_DIR=~/target
export CARGO_TARGET_DIR=~/target
make check BUILDFLAGS=""
- name: Upload python wheels
uses: actions/upload-artifact@v1
with:
name: mac_os_python_wheels
name: anki_mac_os_python_wheels
path: dist

View file

@ -37,11 +37,11 @@ jobs:
with:
path: C:\Rust\.cargo\git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
- name: Cache cargo build
- name: Cache cargo target
uses: actions/cache@v1
with:
path: ${{ github.workspace }}\target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}
- name: Cache pip wheels
uses: actions/cache@v1
with:
@ -97,13 +97,13 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 12
- name: Run checks
- name: Run develop
shell: cmd
run: |
echo on
set "RSPY_TARGET_DIR=%GITHUB_WORKSPACE%\target"
set "CARGO_TARGET_DIR=%GITHUB_WORKSPACE%\target"
make check BUILDFLAGS=""
make develop BUILDFLAGS=""
- name: Run build
shell: cmd
run: |
@ -111,8 +111,15 @@ jobs:
set "RSPY_TARGET_DIR=%GITHUB_WORKSPACE%\target"
set "CARGO_TARGET_DIR=%GITHUB_WORKSPACE%\target"
make build BUILDFLAGS=""
- name: Run check
shell: cmd
run: |
echo on
set "RSPY_TARGET_DIR=%GITHUB_WORKSPACE%\target"
set "CARGO_TARGET_DIR=%GITHUB_WORKSPACE%\target"
make check BUILDFLAGS=""
- name: Upload python wheels
uses: actions/upload-artifact@v1
with:
name: windows_python_wheels
name: anki_windows_python_wheels
path: dist