Fix the Build jobs (#232)
* WIP Build jobs * Remove 'add missing import' * Add yarn build:wasm * Clean up * Trying larger runner for ubuntu * --verbose * Back to docs * WIP * upload artifacts * WIP Windows * WIP Windows * WIP Windows * WIP Windows * WIP Windows * Clean up * Clean up diff * Better upload artifact * Clean up, upload artifacts v3 * Add sed commands back * Add fmt back * Add name * Clean up * Better name * Update .github/workflows/build.yml --------- Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
This commit is contained in:
55
.github/workflows/build.yml
vendored
55
.github/workflows/build.yml
vendored
@ -11,23 +11,32 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||
os: [macos-latest, ubuntu-20.04, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: install ubuntu system dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
if: matrix.os == 'ubuntu-20.04'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev libwebkit2gtk-4.0-dev patchelf
|
||||
# libgdk-pixbuf2.0-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev
|
||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
|
||||
|
||||
- name: Sync node version and setup cache
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18.x'
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'yarn' # Set this to npm, yarn or pnpm.
|
||||
|
||||
- run: yarn install
|
||||
|
||||
- name: Rust setup
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Rust cache
|
||||
uses: swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: './src-tauri -> target'
|
||||
|
||||
- name: wasm prep
|
||||
shell: bash
|
||||
run: |
|
||||
@ -35,39 +44,27 @@ jobs:
|
||||
npx wasm-pack build --target web --out-dir pkg
|
||||
cd ../../
|
||||
cp src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
||||
|
||||
- name: macos sed
|
||||
if: matrix.os == 'macos-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
sed -i '' 's/import.meta.url//g' "./src/wasm-lib/pkg/wasm_lib.js"
|
||||
|
||||
- name: ubuntu and windows sed
|
||||
if: matrix.os != 'macos-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
sed -i 's/import.meta.url//g' "./src/wasm-lib/pkg/wasm_lib.js"
|
||||
- name: add missing import
|
||||
shell: bash
|
||||
run: |
|
||||
yarn add-missing-import
|
||||
pwd
|
||||
ls -la
|
||||
yarn fmt
|
||||
# - name: tauri build
|
||||
# shell: bash
|
||||
# run: yarn tauri build
|
||||
# - uses: actions/upload-artifact@v2
|
||||
# with:
|
||||
# name: tauri-app
|
||||
# path: src-tauri/target/release/bundle
|
||||
- name: Build the app
|
||||
|
||||
- name: Fix format
|
||||
run: yarn fmt
|
||||
|
||||
- name: Build the app for the current platform
|
||||
uses: tauri-apps/tauri-action@v0
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CI: false
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: github.event_name != 'push'
|
||||
with:
|
||||
tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags.
|
||||
releaseName: 'Paraffin v__VERSION__' # tauri-action replaces \_\_VERSION\_\_ with the app version.
|
||||
releaseBody: 'See the assets to download and install this version.'
|
||||
releaseDraft: true
|
||||
prerelease: false
|
||||
path: src-tauri/target/release/bundle
|
||||
name: modeling-app_macos_linux_windows
|
||||
|
||||
Reference in New Issue
Block a user