-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
852 additions
and
732 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 |
---|---|---|
@@ -1,4 +1,14 @@ | ||
# Why dynamic linking? | ||
# See https://github.com/sayanarijit/xplr/issues/309 | ||
|
||
[target.x86_64-unknown-linux-gnu] | ||
rustflags = ["-C", "link-args=-rdynamic"] | ||
|
||
[target.aarch64-unknown-linux-gnu] | ||
rustflags = ["-C", "linker=aarch64-linux-gnu-gcc", "-C", "link-args=-rdynamic"] | ||
|
||
[target.aarch64-linux-android] | ||
rustflags = ["-C", "linker=aarch64-linux-android-clang", "-C", "link-args=-rdynamic", "-C", "default-linker-libraries"] | ||
|
||
[target.arm-unknown-linux-gnueabihf] | ||
rustflags = ["-C", "linker=arm-linux-gnueabihf-gcc", "-C", "link-args=-rdynamic"] |
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 |
---|---|---|
|
@@ -12,71 +12,74 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
- ubuntu-20.04 | ||
build: | ||
- macos | ||
- macos-aarch64 | ||
- linux | ||
- linux-musl | ||
- linux-aarch64 | ||
- linux-arm | ||
rust: [stable] | ||
include: | ||
# See the list: https://github.com/cross-rs/cross | ||
|
||
- os: macos-latest | ||
artifact_prefix: macos | ||
- build: macos | ||
os: macos-latest | ||
target: x86_64-apple-darwin | ||
binary_postfix: "" | ||
|
||
- os: ubuntu-latest | ||
artifact_prefix: linux | ||
- build: macos-aarch64 | ||
os: macos-latest | ||
target: aarch64-apple-darwin | ||
|
||
- build: linux | ||
os: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
binary_postfix: "" | ||
|
||
- os: ubuntu-20.04 | ||
artifact_prefix: linux-musl | ||
- build: linux-musl | ||
os: ubuntu-latest | ||
target: x86_64-unknown-linux-musl | ||
binary_postfix: "" | ||
|
||
# Will see later | ||
- build: linux-aarch64 | ||
os: ubuntu-latest | ||
target: aarch64-unknown-linux-gnu | ||
|
||
# - os: ubuntu-latest | ||
# artifact_prefix: x86_64-android | ||
# target: x86_64-linux-android | ||
# binary_postfix: '' | ||
# | ||
# - os: ubuntu-latest | ||
# artifact_prefix: aarch64-android | ||
# target: aarch64-linux-android | ||
# binary_postfix: '' | ||
- build: linux-arm | ||
os: ubuntu-latest | ||
target: arm-unknown-linux-gnueabihf | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Installing Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
target: ${{ matrix.target }} | ||
override: true | ||
|
||
- name: Installing needed macOS dependencies | ||
if: matrix.os == 'macos-latest' | ||
run: brew install [email protected] | ||
|
||
- name: Installing needed Ubuntu dependencies | ||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04' | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update --fix-missing | ||
sudo apt-get install -y -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev | ||
sudo apt-get install -y --no-install-recommends liblua5.1-0-dev libluajit-5.1-dev gcc pkg-config curl git make ca-certificates | ||
- if: matrix.build == 'linux-musl' | ||
run: sudo apt-get install -y musl-tools | ||
|
||
- if: matrix.build == 'linux-aarch64' | ||
run: sudo apt-get install -y gcc-aarch64-linux-gnu | ||
|
||
- name: Checking out sources | ||
uses: actions/checkout@v1 | ||
- if: matrix.build == 'linux-arm' | ||
run: | | ||
sudo apt-get install -y gcc-multilib | ||
sudo apt-get install -y gcc-arm-linux-gnueabihf | ||
sudo ln -s /usr/include/asm-generic/ /usr/include/asm | ||
- name: Running cargo build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: true | ||
command: build | ||
toolchain: ${{ matrix.rust }} | ||
args: --locked --release --target ${{ matrix.target }} | ||
run: cargo build --locked --release --target ${{ matrix.target }} | ||
|
||
- name: Install gpg secret key | ||
run: | | ||
|
@@ -87,9 +90,9 @@ jobs: | |
shell: bash | ||
run: | | ||
cd target/${{ matrix.target }}/release | ||
BINARY_NAME=xplr${{ matrix.binary_postfix }} | ||
BINARY_NAME=xplr | ||
strip $BINARY_NAME | ||
RELEASE_NAME=xplr-${{ matrix.artifact_prefix }} | ||
RELEASE_NAME=xplr-${{ matrix.build }} | ||
tar czvf $RELEASE_NAME.tar.gz $BINARY_NAME | ||
shasum -a 256 $RELEASE_NAME.tar.gz > $RELEASE_NAME.sha256 | ||
cat <(echo "${{ secrets.GPG_PASS }}") | gpg --pinentry-mode loopback --passphrase-fd 0 --detach-sign --armor $RELEASE_NAME.tar.gz | ||
|
@@ -98,17 +101,17 @@ jobs: | |
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
target/${{ matrix.target }}/release/xplr-${{ matrix.artifact_prefix }}.tar.gz | ||
target/${{ matrix.target }}/release/xplr-${{ matrix.artifact_prefix }}.sha256 | ||
target/${{ matrix.target }}/release/xplr-${{ matrix.artifact_prefix }}.tar.gz.asc | ||
target/${{ matrix.target }}/release/xplr-${{ matrix.build }}.tar.gz | ||
target/${{ matrix.target }}/release/xplr-${{ matrix.build }}.sha256 | ||
target/${{ matrix.target }}/release/xplr-${{ matrix.build }}.tar.gz.asc | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish-gpg-signature: | ||
name: Publishing GPG signature | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Install gpg secret key | ||
run: | | ||
cat <(echo -e "${{ secrets.GPG_SECRET }}") | gpg --batch --import | ||
|
@@ -133,20 +136,16 @@ jobs: | |
name: Publishing to Cargo | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- run: | | ||
sudo apt-get update --fix-missing | ||
sudo apt-get install -y -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: publish | ||
args: --allow-dirty | ||
- run: cargo publish --allow-dirty | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_API_KEY }} |
Oops, something went wrong.