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 }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
os: [macos-latest, ubuntu-20.04, windows-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: install ubuntu system dependencies
|
- name: install ubuntu system dependencies
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-20.04'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
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
|
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
|
||||||
# libgdk-pixbuf2.0-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev
|
|
||||||
- name: Sync node version and setup cache
|
- name: Sync node version and setup cache
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '18.x'
|
node-version-file: '.nvmrc'
|
||||||
cache: 'yarn' # Set this to npm, yarn or pnpm.
|
cache: 'yarn' # Set this to npm, yarn or pnpm.
|
||||||
|
|
||||||
- run: yarn install
|
- run: yarn install
|
||||||
|
|
||||||
- name: Rust setup
|
- name: Rust setup
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
- name: Rust cache
|
||||||
|
uses: swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: './src-tauri -> target'
|
||||||
|
|
||||||
- name: wasm prep
|
- name: wasm prep
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@ -35,39 +44,27 @@ jobs:
|
|||||||
npx wasm-pack build --target web --out-dir pkg
|
npx wasm-pack build --target web --out-dir pkg
|
||||||
cd ../../
|
cd ../../
|
||||||
cp src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
cp src/wasm-lib/pkg/wasm_lib_bg.wasm public
|
||||||
|
|
||||||
- name: macos sed
|
- name: macos sed
|
||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-latest'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sed -i '' 's/import.meta.url//g' "./src/wasm-lib/pkg/wasm_lib.js"
|
sed -i '' 's/import.meta.url//g' "./src/wasm-lib/pkg/wasm_lib.js"
|
||||||
|
|
||||||
- name: ubuntu and windows sed
|
- name: ubuntu and windows sed
|
||||||
if: matrix.os != 'macos-latest'
|
if: matrix.os != 'macos-latest'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sed -i 's/import.meta.url//g' "./src/wasm-lib/pkg/wasm_lib.js"
|
sed -i 's/import.meta.url//g' "./src/wasm-lib/pkg/wasm_lib.js"
|
||||||
- name: add missing import
|
|
||||||
shell: bash
|
- name: Fix format
|
||||||
run: |
|
run: yarn fmt
|
||||||
yarn add-missing-import
|
|
||||||
pwd
|
- name: Build the app for the current platform
|
||||||
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
|
|
||||||
uses: tauri-apps/tauri-action@v0
|
uses: tauri-apps/tauri-action@v0
|
||||||
|
|
||||||
env:
|
- uses: actions/upload-artifact@v3
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
if: github.event_name != 'push'
|
||||||
CI: false
|
|
||||||
with:
|
with:
|
||||||
tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags.
|
path: src-tauri/target/release/bundle
|
||||||
releaseName: 'Paraffin v__VERSION__' # tauri-action replaces \_\_VERSION\_\_ with the app version.
|
name: modeling-app_macos_linux_windows
|
||||||
releaseBody: 'See the assets to download and install this version.'
|
|
||||||
releaseDraft: true
|
|
||||||
prerelease: false
|
|
||||||
|
|||||||
Reference in New Issue
Block a user