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

98 lines
3.0 KiB
YAML
Raw Normal View History

feat(license): SPDX Headers (#1449) * chore(licenses): api Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(licenses): scripts Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): cli/core Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): cli/tauri-bundler Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): workflows Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): require license_template in rust Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): core/tauri Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): core/tauri-api Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): core/tauri-build Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): core/tauri-codegen Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): core/tauri-macros Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): core/tauri-updater Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): core/tauri-utils Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): examples Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): cli/tauri.js Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): changefile Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): place both licenses in root Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): package.json SPDX Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): SPDX everywhere Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * fix(tauri.js): tests more time for ubuntu Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): commons conservancy language Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): add spdx file Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * fix(license): clippy Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(license): language Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>
2021-04-11 01:09:09 +03:00
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
name: build smoke test 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:
workflow_dispatch:
inputs:
repository:
description: "Repository from which to pull and create a Tauri app."
required: false
default: "tauri-apps/tauri"
ref:
description: "Branch or ref to pull down."
required: false
default: "dev"
dir:
description: "Directory we expect to run in."
required: false
default: "tauri/examples/helloworld"
buildAssets:
description: "Command to build the assets."
required: false
default: "echo no build needed"
buildTauri:
description: "Command to build the Tauri app."
required: false
default: "tauri"
env:
RUST_BACKTRACE: 1
[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
jobs:
create-and-upload-assets:
[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
runs-on: ${{ matrix.platform }}
timeout-minutes: 30
[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
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
include:
- platform: ubuntu-latest
releaseFolder: target/release/bundle/deb
- platform: macos-latest
releaseFolder: target/release/bundle/macos
- platform: windows-latest
releaseFolder: target/release/bundle/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@v2
with:
path: tauri
- uses: actions/checkout@v2
with:
repository: ${{ github.event.inputs.repository }}
ref: ${{ github.event.inputs.ref }}
path: example
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 14
- name: install rust stable
uses: actions-rs/toolchain@v1
with:
[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
toolchain: stable
profile: minimal
- name: install webkit2gtk (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- name: yarn install for cli
working-directory: tauri/tooling/cli.js
run: yarn
- name: build cli.js
working-directory: tauri/tooling/cli.js
run: |
yarn build-release
yarn global add $PWD
echo "::add-path::$(yarn global bin)"
- name: install and build assets
working-directory: "example/${{ github.event.inputs.dir }}"
run: ${{ github.event.inputs.buildAssets }}
- name: build tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
includeDebug: true
projectPath: "example/${{ github.event.inputs.dir }}"
preferGlobal: true
- uses: actions/upload-artifact@v2
if: success()
with:
name: tauri-app.${{ matrix.platform }}
path: ${{ format('./{0}{1}/src-tauri/{2}/**', 'example/', github.event.inputs.dir, matrix.releaseFolder ) }}