Skip to content

add working windows steps, pt1 #17

add working windows steps, pt1

add working windows steps, pt1 #17

Workflow file for this run

name: Build
on:
push:
branches: [ "release-pipeline" ]
jobs:
build:
# Build on Linux, Windows and MacOS
strategy:
matrix:
#os: [ubuntu-latest, windows-latest, macos-latest]
#os: [ubuntu-latest, macos-latest]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
# common steps
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.65.0
# Windows steps
- name: setup msys2 for windows
if: matrix.os == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
update: true
install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-sqlite3 gcc make base-devel
msystem: MINGW64
path-type: inherit
- name: configure with Wasm (windows)
if: matrix.os == 'windows-latest'
run: |
./configure --enable-releasemode --enable-wasm-runtime
gcc -shared -DWIN64 -DNDEBUG -D_WINDOWS -D_USRDLL -DNO_TCL -D_CRT_SECURE_NO_DEPRECATE -DTHREADSAFE=1 -DTEMP_STORE=1 -DSQLITE_MAX_EXPR_DEPTH=0 -m64 -I. sqlite3.c shell.c -o liblibsql_wasm.dll -Wl,--out-implib,liblibsql_wasm.a
dir
shell: msys2 {0}
- name: Zip artifact for deployment (windows)
if: matrix.os == 'windows-latest'
run: Compress-Archive -Path liblibsql_wasm.a,liblibsql_wasm.dll libsql-wasm-${{ matrix.os }}.zip
#pacman -S --noconfirm --needed gcc make base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain
# - uses: ilammy/msvc-dev-cmd@v1
# if: matrix.os == 'windows-latest'
# with:
# arch: x64
# Linux/MacOS steps
- name: configure with Wasm (linux/macos)
if: matrix.os != 'windows-latest'
run: |
./configure --enable-releasemode --enable-wasm-runtime && make libsqlite3.la
- name: Zip artifact for deployment (linux/macos)
if: matrix.os != 'windows-latest'
run: zip libsql-wasm-${{ matrix.os }}.zip liblibsql_wasm.a
# Store artefacts
- uses: actions/upload-artifact@v3
with:
name: libsql-wasm-${{ matrix.os }}
path: libsql-wasm-${{ matrix.os }}.zip
retention-days: 1
release:
name: "Release"
needs: build
runs-on: ubuntu-latest
steps:
# We don't need the repo, grab all artifacts from the build stage
# The plugin puts each artifact in a folder of `artifactname`
- uses: actions/download-artifact@v3
- name: Display fetched artifacts
run: ls -Rha
- name: Release
uses: softprops/action-gh-release@v1
with:
token: "${{ secrets.GH_TOKEN }}"
#body_path: RELEASE_NOTES.txt
prerelease: true
tag_name: "${{ github.ref_name }}"
generate_release_notes: true
fail_on_unmatched_files: false
files: |
libsql-wasm-windows-latest/*
libsql-wasm-macos-latest/*
libsql-wasm-ubuntu-latest/*