Skip to content

Commit

Permalink
update cross compile environment
Browse files Browse the repository at this point in the history
  • Loading branch information
tamada committed Apr 17, 2024
1 parent af9c9d0 commit 36ba82a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
36 changes: 26 additions & 10 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,23 @@ jobs:
target: x86_64-unknown-linux-musl
artifact_name: ${{ needs.setup.outputs.appname }}
asset_name: ${{ needs.setup.outputs.appname }}-${{ needs.setup.outputs.tag }}_linux_arm64
- os: ubuntu-latest
target: aarch64-pc-windows-gnullvm
artifact_name: ${{ needs.setup.outputs.appname }}.exe
asset_name: ${{ needs.setup.outputs.appname }}-${{ needs.setup.outputs.tag }}_windows_amd64
# - os: ubuntu-latest
# target: aarch64-pc-windows-gnullvm
# artifact_name: ${{ needs.setup.outputs.appname }}.exe
# asset_name: ${{ needs.setup.outputs.appname }}-${{ needs.setup.outputs.tag }}_windows_amd64
- os: ubuntu-latest
target: x86_64-pc-windows-gnu
artifact_name: ${{ needs.setup.outputs.appname }}.exe
asset_name: ${{ needs.setup.outputs.appname }}-${{ needs.setup.outputs.tag }}_windows_arm64
- os: macos-latest
target: aaarch64-apple-darwin
artifact_name: ${{ needs.setup.outputs.appname }}
asset_name: ${{ needs.setup.outputs.appname }}-${{ needs.setup.outputs.tag }}_darwin_amd64
- os: macos-latest
target: x86_64-apple-darwin
artifact_name: ${{ needs.setup.outputs.appname }}
asset_name: ${{ needs.setup.outputs.appname }}-${{ needs.setup.outputs.tag }}_darwin_arm64


steps:
# initialization
Expand All @@ -63,6 +72,13 @@ jobs:
ref: main
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: Setup variables
id: vars
shell: bash
run: |
DIR=$(echo "${{ needs.setup.outputs.appname }}-${{ needs.setup.outputs.tag }}")
echo "dir=$DIR" >> $GITHUB_OUTPUT
- name: Cache cargo registry
uses: actions/cache@v1
with:
Expand All @@ -74,17 +90,17 @@ jobs:

- name: Setup Rust (1/2) (toolchain)
uses: taiki-e/setup-cross-toolchain-action@v1
if: matrix.os == 'ubuntu-latest'
with:
target: ${{ matrix.target }}

- name: Setup variables
id: vars
shell: bash
- name: Cross build (macOS)
if: matrix.os == 'macos-latest'
run: |
DIR=$(echo "${{ needs.setup.outputs.appname }}-${{ needs.setup.outputs.tag }}")
echo "dir=$DIR" >> $GITHUB_OUTPUT
rustup target add ${{ matrix.target }}
cargo build --release --target ${{ matrix.target }}
- name: Cross build with all features
- name: Cross build (Linux and Windows)
run: |
cargo build --release --target ${{ matrix.target }}
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "totebag"
version = "0.1.13"
version = "0.1.14"
description = "A tool for archiving files and directories and extracting several archive formats."
repository = "https://github.com/tamada/totebag"
readme = "README.md"
Expand Down

0 comments on commit 36ba82a

Please sign in to comment.