Skip to content

Commit

Permalink
ci: add initial build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cilki committed Jul 21, 2024
1 parent 8a4f954 commit f03c74c
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 3 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: build
on:
push:
branches:
- master

jobs:
linux:
name: linux / ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- i686-unknown-linux-gnu
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true

- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- uses: actions-rs/cargo@v1
with:
command: build
args: --release --target ${{ matrix.target }} --all-features

android:
name: android / ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- aarch64-linux-android
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true

- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- uses: rust-mobile/setup-xbuild-action@v1

- name: Build apk
run: |
x doctor
x build
6 changes: 3 additions & 3 deletions sandpolis/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ pub async fn main(args: CommandLine) -> Result<()> {
#[debug_handler]
async fn db_proxy(state: State<AppState>, request: Request) -> impl IntoResponse {
trace!("Passing request to local database");

let response = state
.db
.local
.req(request.method().to_owned(), request.uri().path(), None)
.body(reqwest::Body::wrap_stream(
request.body().into_data_stream(),
))
.headers(request.headers().to_owned())
// .body(reqwest::Body::from(request.body()))
.send()
.await
.unwrap();
Expand Down

0 comments on commit f03c74c

Please sign in to comment.