-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLA-2163] Adds cross-compile configs (#96)
- Loading branch information
1 parent
6cd7a84
commit 2716f8f
Showing
13 changed files
with
194 additions
and
203 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[build] | ||
target = ["x86_64-apple-darwin", "aarch64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-gnu"] | ||
rustflags = ["--cfg", "openssl_vendored"] | ||
|
||
[target.x86_64-unknown-linux-gnu] | ||
linker = "x86_64-unknown-linux-gnu-gcc" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,42 @@ | ||
name: Build releases | ||
name: Build and Release | ||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
release-linux: | ||
name: Release x86_64-unknown-linux-gnu | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build | ||
run: cargo build --release | ||
- name: Archive Release | ||
uses: vimtor/[email protected] | ||
with: | ||
files: target/release/wallet-daemon | ||
dest: target/release/wallet-daemon_${{github.ref_name}}_x86_64-unknown-linux-gnu.zip | ||
- name: Linux Release | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
files: target/release/wallet-daemon_${{github.ref_name}}_x86_64-unknown-linux-gnu.zip | ||
build: | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
toolchain: ["arm64-apple-darwin", "x86_64-apple-darwin", "x86_64-pc-windows-gnu", "x86_64-unknown-linux-gnu"] | ||
|
||
release-windows: | ||
name: Release x86_64-pc-windows-gnu | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
name: Build ${{ matrix.toolchain }} | ||
steps: | ||
- name: Compile and release | ||
if: "!startsWith(github.ref, 'refs/tags/')" | ||
run: echo 'UPLOAD_MODE=none' >> "$GITHUB_ENV" | ||
- name: Set up homebrew | ||
uses: Homebrew/actions/setup-homebrew@master | ||
|
||
- uses: actions/checkout@v4 | ||
- uses: rust-build/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
RUSTTARGET: "x86_64-pc-windows-gnu" | ||
UPLOAD_MODE: ${{ env.UPLOAD_MODE }} | ||
TOOLCHAIN_VERSION: "1.82" | ||
SRC_DIR: src | ||
ARCHIVE_TYPES: "zip" | ||
- name: Install dependencies | ||
run: brew install messense/macos-cross-toolchains/x86_64-unknown-linux-gnu mingw-w64 | ||
|
||
release-mac: | ||
runs-on: macos-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install latest rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: "1.82" | ||
target: x86_64-apple-darwin | ||
default: true | ||
override: true | ||
- name: Build for mac | ||
|
||
- name: Setup toolchain | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
||
- name: Build binaries | ||
run: cargo build --release | ||
- name: Archive Release | ||
|
||
- name: Archive ${{ matrix.toolchain }} | ||
uses: vimtor/[email protected] | ||
with: | ||
files: target/release/wallet-daemon | ||
dest: target/release/wallet-daemon_${{github.ref_name}}_x86_64-apple-darwin.zip | ||
- name: Linux Release | ||
files: target/${{ matrix.toolchain }}/release/wallet-daemon | ||
dest: wallet-daemon_${{github.ref_name}}_${{ matrix.toolchain }}.zip | ||
|
||
- name: Upload artifacts ${{ matrix.toolchain }} | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
files: target/release/wallet-daemon_${{github.ref_name}}_x86_64-apple-darwin.zip | ||
files: wallet-daemon_${{github.ref_name}}_${{ matrix.toolchain }}.zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
on: push | ||
name: Clippy Check | ||
name: Clippy and Format | ||
on: | ||
push: | ||
|
||
jobs: | ||
clippy: | ||
runs-on: ubuntu-latest | ||
name: Clippy | ||
runs-on: macos-latest | ||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy | ||
- uses: auguwu/[email protected] | ||
- name: Set up Homebrew | ||
uses: Homebrew/actions/setup-homebrew@master | ||
|
||
- name: Install dependencies | ||
run: brew install messense/macos-cross-toolchains/x86_64-unknown-linux-gnu mingw-w64 | ||
|
||
- name: Checkou repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup toolchain | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
||
- name: Run clippy | ||
uses: auguwu/[email protected] | ||
with: | ||
token: ${{secrets.GITHUB_TOKEN}} |
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
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 |
---|---|---|
@@ -1,15 +1,13 @@ | ||
name: Test builds docker | ||
|
||
name: Test Docker Build | ||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build docker image | ||
- name: Build | ||
run: | | ||
docker build . |
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 |
---|---|---|
@@ -1,38 +1,23 @@ | ||
name: Test builds releases | ||
name: Test Binary Build | ||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
build-linux: | ||
name: Build x86_64-unknown-linux-gnu | ||
runs-on: ubuntu-latest | ||
build: | ||
name: Build | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: cargo build --release | ||
- name: Set up Homebrew | ||
uses: Homebrew/actions/setup-homebrew@master | ||
|
||
build-windows: | ||
name: Build x86_64-pc-windows-gnu | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: rust-build/[email protected] | ||
with: | ||
RUSTTARGET: "x86_64-pc-windows-gnu" | ||
UPLOAD_MODE: "none" | ||
TOOLCHAIN_VERSION: "1.82" | ||
SRC_DIR: src | ||
ARCHIVE_TYPES: "zip" | ||
- name: Install dependencies | ||
run: brew install messense/macos-cross-toolchains/x86_64-unknown-linux-gnu mingw-w64 | ||
|
||
build-mac: | ||
name: Build x86_64-apple-darwin | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: "1.82" | ||
target: x86_64-apple-darwin | ||
default: true | ||
override: true | ||
- run: cargo build --release | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup toolchain | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
||
- name: Build binaries | ||
run: cargo build --release |
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 |
---|---|---|
|
@@ -5,4 +5,4 @@ Cargo.lock | |
*.pdb | ||
.idea | ||
.vscode | ||
.cargo | ||
sign_binary.sh |
Oops, something went wrong.