Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/actions/upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Upload binary file"
description: "Upload binary file to GitHub releases"
inputs:
repo-token:
required: true
description: "The secret created for the workflow run"
file-name:
required: true
description: "The file name to be uploaded"
tag:
required: false
description: "The short ref name of the branch or tag that triggered the workflow run."
default: ${{ github.ref_name }}
runs:
using: "composite"
steps:
- name: Upload binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ inputs.repo-token }}
overwrite: true
file: ${{ inputs.file-name }}
asset_name: ${{ inputs.file-name }}
tag: ${{ inputs.tag }}
34 changes: 34 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on:
push:
tags:
- "*"
workflow_dispatch:
name: "linux"
jobs:
build_x86_64:
Expand All @@ -20,3 +21,36 @@ jobs:

- name: Build binaries
run: bash tool/build_linux.sh x64

- name: Upload binary
if: github.event_name == 'workflow_dispatch'
uses: ./.github/actions/upload
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
file-name: libpowersync_x64.so
tag: ${{ github.ref_name }}

build_aarch64:
name: Building Linux aarch64
runs-on: ubuntu-arm64
steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
components: rust-src

- name: Build binaries
run: bash tool/build_linux.sh aarch64

- name: Upload binary
if: github.event_name == 'workflow_dispatch'
uses: ./.github/actions/upload
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
file-name: libpowersync_aarch64.so
tag: ${{ github.ref_name }}
8 changes: 8 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ jobs:

- name: Build binary
run: bash tool/build_windows.sh x64

- name: Upload binary
if: github.event_name == 'workflow_dispatch'
uses: ./.github/actions/upload
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
file-name: powersync_x64.dll
tag: ${{ github.ref_name }}
1 change: 0 additions & 1 deletion tool/build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ if [ "$1" = "x64" ]; then
cargo build -p powersync_loadable --release
mv "target/release/libpowersync.so" "libpowersync_x64.so"
else
#Note: aarch64-unknown-linux-gnu has not been tested.
rustup target add aarch64-unknown-linux-gnu
cargo build -p powersync_loadable --release
mv "target/release/libpowersync.so" "libpowersync_aarch64.so"
Expand Down