Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vinhjaxt committed Apr 17, 2022
2 parents 7b81b82 + 7174469 commit e888630
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 38 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/build-cross.yml

This file was deleted.

56 changes: 51 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,65 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# Build amd64 gnu
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
override: true
- name: Build x64 gnu
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target x86_64-unknown-linux-gnu --release
# Done amd64 gnu

# Build amd64 musl
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-musl
override: true
- name: Build x64 musl
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target x86_64-unknown-linux-musl --release
# Done amd64 musl

# Build arm64 musl
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-unknown-linux-musl
override: true
- name: Build aarch 64 binary
- name: Build aarch64 musl
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target aarch64-unknown-linux-musl --release
- run: mv target/aarch64-unknown-linux-musl/release/static-fs target/aarch64-unknown-linux-musl/release/static-fs-linux-musl-aarch64
- uses: actions/upload-artifact@v2
# Done arm64 musl

# Create release
- name: Generate release tag
id: tag
run: |
echo "::set-output name=release_tag::ActionBuild_$(date +"%Y.%m.%d_%H-%M-%S")"
- name: Move files
run: |
mv ./target/aarch64-unknown-linux-musl/release/static-fs ./static-fs-linux-musl-aarch64
mv ./target/x86_64-unknown-linux-musl/release/static-fs ./static-fs-linux-musl-amd64
mv ./target/x86_64-unknown-linux-gnu/release/static-fs ./static-fs-linux-gnu-amd64
- name: Release
uses: softprops/action-gh-release@v1
with:
name: aarch64-artifact
path: target/aarch64-unknown-linux-musl/release/static-fs-linux-musl-aarch64
tag_name: ${{ steps.tag.outputs.release_tag }}
files: |
./static-fs-linux-musl-aarch64
./static-fs-linux-musl-amd64
./static-fs-linux-gnu-amd64
# Done release
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Rust static file serve.
It is suitable for serving static built of Single Page Applications (SPA)
# Usage
```
./static-fs-linux-gnu :8080
./static-fs-linux-gnu 127.0.0.1:8080
./static-fs-linux-gnu unix:/tmp/http.sock
./static-fs-linux-gnu unix:/tmp/http.sock /opt/build/public
./static-fs-linux-gnu -b :8080
./static-fs-linux-gnu -b 127.0.0.1:8080
./static-fs-linux-gnu -b unix:/tmp/http.sock
./static-fs-linux-gnu -b unix:/tmp/http.sock -f /opt/build/public
```
# Build
```
Expand Down

0 comments on commit e888630

Please sign in to comment.