Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support of binary for aarch64-apple-darwin(M1 mac) to GitHub release pages #591

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,50 @@ jobs:
include:
- os: ubuntu-latest
toolchain: stable
transpile_target: null
- os: ubuntu-18.04
toolchain: 1.53
transpile_target: null
- os: windows-latest
toolchain: stable
transpile_target: null
- os: macos-latest
toolchain: stable
transpile_target: null
- os: macos-latest
toolchain: stable
transpile_target: aarch64-apple-darwin
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
- name: Install Rust toolchain for a native compiler
uses: actions-rs/toolchain@v1
id: rust_toolchain_native
if: matrix.transpile_target == null
with:
toolchain: ${{ matrix.toolchain }}
profile: minimal
override: true
components: rustfmt
- name: Install Rust toolchain for a cross compiler
uses: actions-rs/toolchain@v1
if: steps.rust_toolchain_native.conclusion == 'skipped'
with:
toolchain: ${{ matrix.toolchain }}
profile: minimal
override: true
components: rustfmt
target: ${{ matrix.transpile_target }}
- name: Cache dependencies
uses: Swatinem/rust-cache@v1
- name: Compile
- name: Compile with a native compiler
id: rust_compile_native
if: matrix.transpile_target == null
run: cargo test --no-run --locked
- name: Test
- name: Compile with a cross compiler
if: steps.rust_compile_native.conclusion == 'skipped'
run: cargo test --target ${{ matrix.transpile_target }} --no-run --locked
- name: Test with a native compiler
id: rust_test_native
if: matrix.transpile_target == null
run: cargo test -- --nocapture --quiet
18 changes: 18 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,44 @@ jobs:
matrix:
include:
- os: ubuntu-18.04
transpile_target: null
archive_file: texlab-x86_64-linux.tar.gz
archive_cmd: tar -czvf {0} -C target/release texlab
archive_type: application/gzip
- os: windows-latest
transpile_target: null
archive_file: texlab-x86_64-windows.zip
archive_cmd: Compress-Archive target/release/texlab.exe {0}
archive_type: application/zip
- os: macos-latest
transpile_target: null
archive_file: texlab-x86_64-macos.tar.gz
archive_cmd: brew install gnu-tar; gtar -czvf {0} -C target/release texlab
archive_type: application/gzip
- os: macos-11
transpile_target: aarch64-apple-darwin
archive_file: texlab-aarch64-macos.tar.gz
archive_cmd: brew install gnu-tar; gtar -czvf {0} -C target/release texlab
archive_type: application/gzip
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
id: rust_toolchain_native
if: matrix.transpile_target == null
with:
toolchain: stable
target: matrix.transpile_target
- uses: actions-rs/cargo@v1
id: rust_build_native
if: matrix.transpile_target == null
with:
command: build
args: --release --locked
- uses: actions-rs/cargo@v1
if: steps.rust_toolchain_native.conclusion == 'skipped'
with:
command: build
args: --release --locked --target ${{ matrix.transpile_target }}
- run: ${{ format(matrix.archive_cmd, matrix.archive_file) }}
name: "Compress release binary"
- uses: actions/upload-release-asset@v1
Expand Down