tauri/.github/workflows/smoke-tests-source.yml

109 lines
3.6 KiB
YAML
Raw Normal View History

name: build smoke tests with source
[WIP] example / gatsby / themed-site (#120) * add themed gatsby site as example and test target * add specific example ignores to gitignore * update api key reference * theme needs the alpha version currently * update and pin deps * remove lock file, we want a fresh build to test every time * add recipe theme for cheap way to add to ton of site pages * add tauri as dev dep * build gatsby as a smoke test * cd on each step * pass api key * chore(package.json): update * schedule renovate to tone down noisiness (#122) Also, there is a running theory that Tuesday is a good day for upgrades. * combine jobs and add step with conditional (#121) * combine jobs and add step with conditional * too many equals * Update dependency fast-glob to v3.1.1 (#113) * chore(yarn.lock): update * chore(versions): bump tauri.js & tauri * feat(gatsby): include tauri resources * feat(build): tauri build works * tauri prod and source scripts * add build from source and artifact upload to action * don't need to init, examples are already * point to direct executable with matrix * ignore WixTools from build * config app name * build and install source deps before build project on source * odd things when tauri is defined in a script, remove * set gatsby config to what is believed will be ~es5 * babel plugin is actually neeeded * run subscripts with yarn * lower timeout limit to 30 minutes, easy to swamp CI with this * shorten job names * install tauri-cli (rust) * make API key optional (sort of hacky) * install rust for prod for cargo command following * artifact name cannot have / within it * windows is running a tad slow
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
folder: react/gatsby-themed-site
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
- name: quasar-app
folder: vue/quasar-app
executable: app
- name: svelte-app
folder: svelte/svelte-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
CARGO_HOME: ~/.cargo
releaseFolder: target/release
ext: .x86.msi
[WIP] example / gatsby / themed-site (#120) * add themed gatsby site as example and test target * add specific example ignores to gitignore * update api key reference * theme needs the alpha version currently * update and pin deps * remove lock file, we want a fresh build to test every time * add recipe theme for cheap way to add to ton of site pages * add tauri as dev dep * build gatsby as a smoke test * cd on each step * pass api key * chore(package.json): update * schedule renovate to tone down noisiness (#122) Also, there is a running theory that Tuesday is a good day for upgrades. * combine jobs and add step with conditional (#121) * combine jobs and add step with conditional * too many equals * Update dependency fast-glob to v3.1.1 (#113) * chore(yarn.lock): update * chore(versions): bump tauri.js & tauri * feat(gatsby): include tauri resources * feat(build): tauri build works * tauri prod and source scripts * add build from source and artifact upload to action * don't need to init, examples are already * point to direct executable with matrix * ignore WixTools from build * config app name * build and install source deps before build project on source * odd things when tauri is defined in a script, remove * set gatsby config to what is believed will be ~es5 * babel plugin is actually neeeded * run subscripts with yarn * lower timeout limit to 30 minutes, easy to swamp CI with this * shorten job names * install tauri-cli (rust) * make API key optional (sort of hacky) * install rust for prod for cargo command following * artifact name cannot have / within it * windows is running a tad slow
2019-12-02 17:20:20 +03:00
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 3
- name: install rust stable
[WIP] example / gatsby / themed-site (#120) * add themed gatsby site as example and test target * add specific example ignores to gitignore * update api key reference * theme needs the alpha version currently * update and pin deps * remove lock file, we want a fresh build to test every time * add recipe theme for cheap way to add to ton of site pages * add tauri as dev dep * build gatsby as a smoke test * cd on each step * pass api key * chore(package.json): update * schedule renovate to tone down noisiness (#122) Also, there is a running theory that Tuesday is a good day for upgrades. * combine jobs and add step with conditional (#121) * combine jobs and add step with conditional * too many equals * Update dependency fast-glob to v3.1.1 (#113) * chore(yarn.lock): update * chore(versions): bump tauri.js & tauri * feat(gatsby): include tauri resources * feat(build): tauri build works * tauri prod and source scripts * add build from source and artifact upload to action * don't need to init, examples are already * point to direct executable with matrix * ignore WixTools from build * config app name * build and install source deps before build project on source * odd things when tauri is defined in a script, remove * set gatsby config to what is believed will be ~es5 * babel plugin is actually neeeded * run subscripts with yarn * lower timeout limit to 30 minutes, easy to swamp CI with this * shorten job names * install tauri-cli (rust) * make API key optional (sort of hacky) * install rust for prod for cargo command following * artifact name cannot have / within it * windows is running a tad slow
2019-12-02 17:20:20 +03:00
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
[WIP] example / gatsby / themed-site (#120) * add themed gatsby site as example and test target * add specific example ignores to gitignore * update api key reference * theme needs the alpha version currently * update and pin deps * remove lock file, we want a fresh build to test every time * add recipe theme for cheap way to add to ton of site pages * add tauri as dev dep * build gatsby as a smoke test * cd on each step * pass api key * chore(package.json): update * schedule renovate to tone down noisiness (#122) Also, there is a running theory that Tuesday is a good day for upgrades. * combine jobs and add step with conditional (#121) * combine jobs and add step with conditional * too many equals * Update dependency fast-glob to v3.1.1 (#113) * chore(yarn.lock): update * chore(versions): bump tauri.js & tauri * feat(gatsby): include tauri resources * feat(build): tauri build works * tauri prod and source scripts * add build from source and artifact upload to action * don't need to init, examples are already * point to direct executable with matrix * ignore WixTools from build * config app name * build and install source deps before build project on source * odd things when tauri is defined in a script, remove * set gatsby config to what is believed will be ~es5 * babel plugin is actually neeeded * run subscripts with yarn * lower timeout limit to 30 minutes, easy to swamp CI with this * shorten job names * install tauri-cli (rust) * make API key optional (sort of hacky) * install rust for prod for cargo command following * artifact name cannot have / within it * windows is running a tad slow
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
- name: cache rust bin
uses: actions/cache@v1
with:
path: ${{ format('{0}/bin/', matrix.CARGO_HOME) }}
key: ${{ runner.OS }}-build-bin-${{ hashFiles('**/Cargo.toml') }}-
- 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.toml') }}-
- 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.toml') }}-
[WIP] example / gatsby / themed-site (#120) * add themed gatsby site as example and test target * add specific example ignores to gitignore * update api key reference * theme needs the alpha version currently * update and pin deps * remove lock file, we want a fresh build to test every time * add recipe theme for cheap way to add to ton of site pages * add tauri as dev dep * build gatsby as a smoke test * cd on each step * pass api key * chore(package.json): update * schedule renovate to tone down noisiness (#122) Also, there is a running theory that Tuesday is a good day for upgrades. * combine jobs and add step with conditional (#121) * combine jobs and add step with conditional * too many equals * Update dependency fast-glob to v3.1.1 (#113) * chore(yarn.lock): update * chore(versions): bump tauri.js & tauri * feat(gatsby): include tauri resources * feat(build): tauri build works * tauri prod and source scripts * add build from source and artifact upload to action * don't need to init, examples are already * point to direct executable with matrix * ignore WixTools from build * config app name * build and install source deps before build project on source * odd things when tauri is defined in a script, remove * set gatsby config to what is believed will be ~es5 * babel plugin is actually neeeded * run subscripts with yarn * lower timeout limit to 30 minutes, easy to swamp CI with this * shorten job names * install tauri-cli (rust) * make API key optional (sort of hacky) * install rust for prod for cargo command following * artifact name cannot have / within it * windows is running a tad slow
2019-12-02 17:20:20 +03:00
- name: build rust
run: cargo build
env:
TAURI_DIST_DIR: ../../test/fixture/dist
TAURI_DIR: ../test/fixture/src-tauri
[WIP] example / gatsby / themed-site (#120) * add themed gatsby site as example and test target * add specific example ignores to gitignore * update api key reference * theme needs the alpha version currently * update and pin deps * remove lock file, we want a fresh build to test every time * add recipe theme for cheap way to add to ton of site pages * add tauri as dev dep * build gatsby as a smoke test * cd on each step * pass api key * chore(package.json): update * schedule renovate to tone down noisiness (#122) Also, there is a running theory that Tuesday is a good day for upgrades. * combine jobs and add step with conditional (#121) * combine jobs and add step with conditional * too many equals * Update dependency fast-glob to v3.1.1 (#113) * chore(yarn.lock): update * chore(versions): bump tauri.js & tauri * feat(gatsby): include tauri resources * feat(build): tauri build works * tauri prod and source scripts * add build from source and artifact upload to action * don't need to init, examples are already * point to direct executable with matrix * ignore WixTools from build * config app name * build and install source deps before build project on source * odd things when tauri is defined in a script, remove * set gatsby config to what is believed will be ~es5 * babel plugin is actually neeeded * run subscripts with yarn * lower timeout limit to 30 minutes, easy to swamp CI with this * shorten job names * install tauri-cli (rust) * make API key optional (sort of hacky) * install rust for prod for cargo command following * artifact name cannot have / within it * windows is running a tad slow
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
- 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 }}-
[WIP] example / gatsby / themed-site (#120) * add themed gatsby site as example and test target * add specific example ignores to gitignore * update api key reference * theme needs the alpha version currently * update and pin deps * remove lock file, we want a fresh build to test every time * add recipe theme for cheap way to add to ton of site pages * add tauri as dev dep * build gatsby as a smoke test * cd on each step * pass api key * chore(package.json): update * schedule renovate to tone down noisiness (#122) Also, there is a running theory that Tuesday is a good day for upgrades. * combine jobs and add step with conditional (#121) * combine jobs and add step with conditional * too many equals * Update dependency fast-glob to v3.1.1 (#113) * chore(yarn.lock): update * chore(versions): bump tauri.js & tauri * feat(gatsby): include tauri resources * feat(build): tauri build works * tauri prod and source scripts * add build from source and artifact upload to action * don't need to init, examples are already * point to direct executable with matrix * ignore WixTools from build * config app name * build and install source deps before build project on source * odd things when tauri is defined in a script, remove * set gatsby config to what is believed will be ~es5 * babel plugin is actually neeeded * run subscripts with yarn * lower timeout limit to 30 minutes, easy to swamp CI with this * shorten job names * install tauri-cli (rust) * make API key optional (sort of hacky) * install rust for prod for cargo command following * artifact name cannot have / within it * windows is running a tad slow
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:
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 ) }}