Skip to content

change .lib to .dll for windows builds #15

change .lib to .dll for windows builds

change .lib to .dll for windows builds #15

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:
- uses: actions/checkout@v3
- 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
msystem: MINGW64
path-type: inherit
- uses: ilammy/msvc-dev-cmd@v1
if: matrix.os == 'windows-latest'
with:
arch: x64
- uses: dtolnay/rust-toolchain@1.65.0
- name: configure with Wasm (linux/macos)
if: matrix.os != 'windows-latest'
run: |
./configure --enable-releasemode --enable-wasm-runtime && make libsqlite3.la
- name: configure with Wasm (windows)
if: matrix.os == 'windows-latest'
run: |
./configure --enable-releasemode --enable-wasm-runtime && make libsqlite3.dll
dir
# shell: msys2 {0}
# - name: for test do not build (unix)
# if: matrix.os != 'windows-latest'
# run: |
# mkdir -p .libs
# echo "test ${{ matrix.os }}" >> .libs/liblibsql_wasm.a
# - name: for test do not build (windows)
# if: matrix.os == 'windows-latest'
# run: |
# md .libs
# echo "test ${{ matrix.os }}" >> .libs/liblibsql_wasm.a
- name: Zip artifact for deployment (linux/maxos)
if: matrix.os != 'windows-latest'
run: zip libsql-wasm-${{ matrix.os }}.zip .libs/liblibsql_wasm.a
- name: Zip artifact for deployment (windows)
if: matrix.os == 'windows-latest'
run: Compress-Archive .libs/liblibsql_wasm.a libsql-wasm-${{ matrix.os }}.zip
- 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/*