Skip to content

Commit

Permalink
build: 7z instead of zip for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nalgeon committed Aug 31, 2022
1 parent 709fa1b commit f91f530
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,22 @@ jobs:
- name: Build for Linux
if: matrix.os == 'ubuntu-latest'
run: make compile-linux
run: |
make compile-linux
make pack-linux
- name: Build for Windows
if: matrix.os == 'windows-latest'
shell: bash
run: make compile-windows
run: |
make compile-windows
make pack-windows
- name: Build for macOS
if: matrix.os == 'macos-latest'
run: make compile-macos
run: |
make compile-macos
make pack-macos
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ compile-linux:
gcc -fPIC -shared src/sqlite3-unicode.c -o dist/unicode.so
gcc -fPIC -shared src/sqlite3-uuid.c -o dist/uuid.so
gcc -fPIC -shared src/sqlite3-vsv.c -o dist/vsv.so -lm

pack-linux:
zip -j dist/sqlean-linux-x86.zip dist/*.so

compile-windows:
Expand All @@ -43,7 +45,9 @@ compile-windows:
gcc -shared -I. src/sqlite3-unicode.c -o dist/unicode.dll
gcc -shared -I. src/sqlite3-uuid.c -o dist/uuid.dll
gcc -shared -I. src/sqlite3-vsv.c -o dist/vsv.dll -lm
zip -j dist/sqlean-win-x64.zip dist/*.dll

pack-windows:
7z a -tzip dist/sqlean-win-x64.zip ./dist/*.dll

compile-macos:
gcc -fPIC -dynamiclib -I src src/sqlite3-crypto.c src/crypto/*.c -o dist/crypto.dylib
Expand All @@ -58,6 +62,8 @@ compile-macos:
gcc -fPIC -dynamiclib -I src src/sqlite3-unicode.c -o dist/unicode.dylib
gcc -fPIC -dynamiclib -I src src/sqlite3-uuid.c -o dist/uuid.dylib
gcc -fPIC -dynamiclib -I src src/sqlite3-vsv.c -o dist/vsv.dylib -lm

pack-macos:
zip -j dist/sqlean-macos-x86.zip dist/*.dylib

test-all:
Expand Down

0 comments on commit f91f530

Please sign in to comment.