-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Cross-compile to arm * fix linter warnings * inc version
- Loading branch information
Showing
3 changed files
with
29 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,12 +15,21 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Install stable toolchain linux | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- name: Run tests | ||
run: cargo test --verbose | ||
|
||
release-linux: | ||
runs-on: ubuntu-latest | ||
needs: tests | ||
strategy: | ||
matrix: | ||
target: [ aarch64-unknown-linux-musl, x86_64-unknown-linux-musl ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
@@ -29,30 +38,40 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
path: target | ||
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }} | ||
key: ${{ matrix.target }}-build-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-build- | ||
${{ matrix.target }}-build- | ||
- name: Install stable toolchain linux | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
target: x86_64-unknown-linux-musl | ||
target: ${{ matrix.target }} | ||
|
||
- name: Build for release linux | ||
- name: Install musl-tools | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y musl-tools | ||
cargo build --release --target=x86_64-unknown-linux-musl | ||
mv target/x86_64-unknown-linux-musl/release bin/ | ||
tar -czvf protofetch_linux_amd64.tar.gz bin/protofetch | ||
- name: Build target | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: true | ||
command: build | ||
args: --release --target ${{ matrix.target }} | ||
|
||
- name: Package | ||
run: | | ||
mv target/${{ matrix.target }}/release bin/ | ||
tar -czvf protofetch_${{ matrix.target }}.tar.gz bin/protofetch | ||
- name: Upload release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
protofetch_linux_amd64.tar.gz | ||
protofetch_${{ matrix.target }}.tar.gz | ||
release-mac-arm: | ||
runs-on: macos-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters