2019-12-21 12:47:33 +03:00
|
|
|
name: build smoke tests with source
|
2019-12-02 17:20:20 +03:00
|
|
|
|
|
|
|
on: pull_request
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
via-source:
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
timeout-minutes: 40
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
example:
|
|
|
|
- name : GatsbyThemedSite
|
2019-12-21 09:34:36 +03:00
|
|
|
folder: react/gatsby-themed-site
|
2019-12-21 12:47:33 +03:00
|
|
|
executable: gatsby-themed-site-app
|
|
|
|
- name : CRAApp
|
|
|
|
folder: react/create-react-app
|
|
|
|
executable: app
|
|
|
|
- name : NextjsApp
|
|
|
|
folder: react/next.js
|
|
|
|
executable: app
|
|
|
|
- name : VanillajsMonolithApp
|
|
|
|
folder: vanillajs/monolith
|
|
|
|
executable: app
|
2019-12-03 01:48:43 +03:00
|
|
|
- name: quasar-app
|
|
|
|
folder: vue/quasar-app
|
|
|
|
executable: app
|
2019-12-25 02:13:21 +03:00
|
|
|
- name: svelte-app
|
|
|
|
folder: svelte/svelte-app
|
|
|
|
executable: app
|
2019-12-03 01:48:43 +03:00
|
|
|
include:
|
2019-12-04 22:24:27 +03:00
|
|
|
- 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
|
2019-12-03 01:48:43 +03:00
|
|
|
- platform: windows-latest
|
2019-12-04 22:24:27 +03:00
|
|
|
CARGO_HOME: ~/.cargo
|
|
|
|
releaseFolder: target/release
|
|
|
|
ext: .x86.msi
|
2019-12-02 17:20:20 +03:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
fetch-depth: 3
|
2019-12-04 22:24:27 +03:00
|
|
|
- name: install rust stable
|
2019-12-02 17:20:20 +03:00
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
2019-12-30 03:41:03 +03:00
|
|
|
profile: minimal
|
2019-12-02 17:20:20 +03:00
|
|
|
- name: install webkit2gtk (ubuntu only)
|
|
|
|
if: matrix.platform == 'ubuntu-latest'
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y webkit2gtk-4.0
|
2019-12-04 22:24:27 +03:00
|
|
|
- name: cache rust bin
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ${{ format('{0}/bin/', matrix.CARGO_HOME) }}
|
2019-12-31 02:07:26 +03:00
|
|
|
key: ${{ runner.OS }}-build-bin-${{ hashFiles('**/Cargo.toml') }}-
|
2019-12-04 22:24:27 +03:00
|
|
|
- name: cache rust registry/index
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ${{ format('{0}/registry/index/', matrix.CARGO_HOME) }}
|
2019-12-31 02:07:26 +03:00
|
|
|
key: ${{ runner.OS }}-build-reg-index-${{ hashFiles('**/Cargo.toml') }}-
|
2019-12-04 22:24:27 +03:00
|
|
|
- name: cache rust registry/cache
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ${{ format('{0}/registry/cache/', matrix.CARGO_HOME) }}
|
2019-12-31 02:07:26 +03:00
|
|
|
key: ${{ runner.OS }}-build-reg-cache-${{ hashFiles('**/Cargo.toml') }}-
|
2019-12-02 17:20:20 +03:00
|
|
|
- name: build rust
|
|
|
|
run: cargo build
|
|
|
|
env:
|
|
|
|
TAURI_DIST_DIR: ../../test/fixture/dist
|
2019-12-26 17:24:36 +03:00
|
|
|
TAURI_DIR: ../test/fixture/src-tauri
|
2019-12-02 17:20:20 +03:00
|
|
|
- run: cargo install --path ./cli/tauri-cli --force
|
|
|
|
- name: install cli deps via yarn
|
|
|
|
run: |
|
|
|
|
cd ./cli/tauri.js
|
|
|
|
yarn
|
2019-12-03 01:48:43 +03:00
|
|
|
- name: cache node modules
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ${{ format('examples/{0}/node_modules', matrix.example.folder) }}
|
|
|
|
key: ${{ runner.OS }}-build-${{ hashFiles(format('examples/{0}/yarn.lock', matrix.example.folder)) }}
|
|
|
|
restore-keys: ${{ runner.OS }}-build-${{ env.cache-name }}-
|
2019-12-02 17:20:20 +03:00
|
|
|
- name: install via yarn
|
|
|
|
run: |
|
|
|
|
cd ./examples/${{ matrix.example.folder }}
|
|
|
|
yarn
|
|
|
|
- name: build example
|
|
|
|
run: |
|
|
|
|
cd ./examples/${{ matrix.example.folder }}
|
|
|
|
yarn build
|
|
|
|
- name: yarn tauri build
|
|
|
|
run: |
|
|
|
|
cd ./examples/${{ matrix.example.folder }}
|
|
|
|
yarn tauri:source:build
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
if: success()
|
|
|
|
with:
|
2019-12-04 22:24:27 +03:00
|
|
|
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 ) }}
|