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: with:
path: ~/.cargo/git path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }} key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
- name: Cache cargo build - name: Cache cargo target
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ~/target path: ~/target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }} key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}
- name: Cache pip wheels - name: Cache pip wheels
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
@ -52,18 +52,23 @@ 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 checks - name: Run develop
run: | run: |
export RSPY_TARGET_DIR=~/target export RSPY_TARGET_DIR=~/target
export CARGO_TARGET_DIR=~/target export CARGO_TARGET_DIR=~/target
make check BUILDFLAGS="" make develop BUILDFLAGS=""
- name: Run build - name: Run build
run: | run: |
export RSPY_TARGET_DIR=~/target export RSPY_TARGET_DIR=~/target
export CARGO_TARGET_DIR=~/target export CARGO_TARGET_DIR=~/target
make build BUILDFLAGS="" make build BUILDFLAGS=""
- name: Run check
run: |
export RSPY_TARGET_DIR=~/target
export CARGO_TARGET_DIR=~/target
make check BUILDFLAGS=""
- name: Upload python wheels - name: Upload python wheels
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: linux_python_wheels name: anki_linux_python_wheels
path: dist path: dist

View file

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

View file

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