diff --git a/.github/workflows/build-smoke-tests.yml b/.github/workflows/build-smoke-tests.yml index 10d7310f5..114d8f0ea 100644 --- a/.github/workflows/build-smoke-tests.yml +++ b/.github/workflows/build-smoke-tests.yml @@ -12,15 +12,37 @@ jobs: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] example: [gatsby/themed-site, vue/quasar-app] + include: + - platform: ubuntu-latest + CARGO_HOME: ~/.cargo + - platform: macos-latest + CARGO_HOME: ~/.cargo + - platform: windows-latest + CARGO_HOME: ~/.cargo steps: - uses: actions/checkout@v1 with: fetch-depth: 3 - - name: install stable + - name: install rust stable uses: actions-rs/toolchain@v1 with: toolchain: stable + - name: cache rust bin + uses: actions/cache@v1 + with: + path: ${{ format('{0}/bin/', matrix.CARGO_HOME) }} + key: ${{ runner.OS }}-build-bin-${{ hashFiles('**/Cargo.lock') }}- + - name: cache rust registry/index + uses: actions/cache@v1 + with: + path: ${{ format('{0}/registry/index/', matrix.CARGO_HOME) }} + key: ${{ runner.OS }}-build-reg-index-${{ hashFiles('**/Cargo.lock') }}- + - name: cache rust registry/cache + uses: actions/cache@v1 + with: + path: ${{ format('{0}/registry/cache/', matrix.CARGO_HOME) }} + key: ${{ runner.OS }}-build-reg-cache-${{ hashFiles('**/Cargo.lock') }}- - run: cargo install tauri-cli - name: cache node modules uses: actions/cache@v1 @@ -59,14 +81,24 @@ jobs: folder: vue/quasar-app executable: app include: + - platform: ubuntu-latest + CARGO_HOME: ~/.cargo + releaseFolder: target/release/bundle/deb + ext: _0.1.0_amd64.deb + - platform: macos-latest + CARGO_HOME: ~/.cargo + releaseFolder: target/release/bundle/osx + ext: .app - platform: windows-latest - ext: .exe + CARGO_HOME: ~/.cargo + releaseFolder: target/release + ext: .x86.msi steps: - uses: actions/checkout@v1 with: fetch-depth: 3 - - name: install stable + - name: install rust stable uses: actions-rs/toolchain@v1 with: toolchain: stable @@ -75,6 +107,21 @@ jobs: run: | sudo apt-get update sudo apt-get install -y webkit2gtk-4.0 + - name: cache rust bin + uses: actions/cache@v1 + with: + path: ${{ format('{0}/bin/', matrix.CARGO_HOME) }} + key: ${{ runner.OS }}-build-bin-${{ hashFiles('**/Cargo.lock') }}- + - name: cache rust registry/index + uses: actions/cache@v1 + with: + path: ${{ format('{0}/registry/index/', matrix.CARGO_HOME) }} + key: ${{ runner.OS }}-build-reg-index-${{ hashFiles('**/Cargo.lock') }}- + - name: cache rust registry/cache + uses: actions/cache@v1 + with: + path: ${{ format('{0}/registry/cache/', matrix.CARGO_HOME) }} + key: ${{ runner.OS }}-build-reg-cache-${{ hashFiles('**/Cargo.lock') }}- - name: build rust run: cargo build env: @@ -108,5 +155,5 @@ jobs: - uses: actions/upload-artifact@v1 if: success() with: - name: tauri built ${{ matrix.example.name }} on ${{ matrix.platform }} - path: ./examples/${{ matrix.example.folder }}/src-tauri/target/release/${{ matrix.example.executable }}${{ matrix.ext }} + name: ${{ matrix.example.name }}(${{ matrix.platform }}) + path: ${{ format('./examples/{0}/src-tauri/{1}/{2}{3}', matrix.example.folder, matrix.releaseFolder, matrix.example.executable, matrix.ext ) }}