Skip to content

Commit

Permalink
Push
Browse files Browse the repository at this point in the history
Add test running

fix on

Add content type

Try android binary build

Add mac builder

Fix name

Add cli for macos

Change stat for mac

debug android

Test mac and android fix

Test binaries

Fix inlining

Echo test

Tweak curl

Fix content type
  • Loading branch information
zackify committed Mar 5, 2020
1 parent 3c6f2fb commit 5a38ed0
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build-binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build Binaries
on:
release:
types: # This configuration does not affect the page_build event above
- created
jobs:
build_for_mac:
name: MacOS
runs-on: macos-10.15
steps:
- uses: actions/checkout@master
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Rename binary
run: mv target/release/flydb flydb-macos64
- name: Upload to release
run: |
curl \
-f \
-sSL \
-XPOST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Content-Length: $(stat -f%z flydb-macos64)" \
-H "Content-Type: application/octet-stream" \
--upload-file "flydb-macos64" \
"https://uploads.github.com/repos/$GITHUB_REPOSITORY/releases/$(jq --raw-output '.release.id' $GITHUB_EVENT_PATH)/assets?name=flydb-macos64"
build_for_android:
name: Android
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-linux-android
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target aarch64-linux-android
- name: Rename binary
run: mv target/aarch64-linux-android/release/flydb flydb-linux-android
- name: Upload to release
uses: JasonEtco/upload-to-release@d648f1babf776de9cad881320bd9e9818fc3b262
with:
args: flydb-linux-android application/octet-stream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build_for_linux:
name: Linux
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Rename binary
run: mv target/release/flydb flydb-linux-amd64
- name: Upload to release
uses: JasonEtco/upload-to-release@d648f1babf776de9cad881320bd9e9818fc3b262
with:
args: flydb-linux-amd64 application/octet-stream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Cargo Tests
on:
push:
branches:
- '**'
jobs:
build_and_test:
name: FlyDB Server Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/cargo@v1
with:
command: test

0 comments on commit 5a38ed0

Please sign in to comment.