Skip to content

Commit

Permalink
More CI tweaks (#256)
Browse files Browse the repository at this point in the history
* Make sure that MacOS ARM builds in CI

* Include man page and completions in prebuilt releases
  • Loading branch information
CosmicHorrorDev authored Oct 24, 2023
1 parent d1fd7c6 commit 662c10b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,27 @@ jobs:
echo "BIN_NAME=sd" >> $GITHUB_ENV
fi
- name: Setup archive
shell: bash
run: |
staging="sd-${{ env.SD_VERSION }}-${{ matrix.target }}"
mkdir -p "$staging"
cp -r {README.md,LICENSE,gen/*} "$staging"
if [ "${{ matrix.os }}" = "windows-latest" ]; then
cp "target/${{ matrix.target }}/release/sd.exe" "$staging/"
7z a "$staging.zip" "$staging"
echo "ASSET=$staging.zip" >> $GITHUB_ENV
else
cp "target/${{ matrix.target }}/release-lto/inlyne" "$staging/"
tar czf "$staging.tar.gz" "$staging"
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
fi
- name: Upload binaries to release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target }}/release/${{ env.BIN_NAME }}
asset_name: sd-${{ env.SD_VERSION }}-${{ matrix.target }}
file: ${{ env.ASSET }}
asset_name: ${{ env.ASSET }}
tag: ${{ github.ref }}
17 changes: 11 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ jobs:
target: x86_64-apple-darwin
use-cross: false

# For legal reasons, cross doesn't support Apple Silicon. See this: https://github.com/cross-rs/cross-toolchains#darwin-targets
# It builds and runs fine, but there's no convenient way to test it in CI, ATM.
# - os: macos-latest
# target: aarch64-apple-darwin
# use-cross: false
- os: macos-latest
target: aarch64-apple-darwin
use-cross: false

- os: ubuntu-latest
target: aarch64-unknown-linux-musl
Expand Down Expand Up @@ -84,4 +82,11 @@ jobs:
shell: bash
run: |
$CARGO --version
$CARGO test --target ${{ matrix.target }}
# For legal reasons, cross doesn't support Apple Silicon. See this:
# https://github.com/cross-rs/cross-toolchains#darwin-targets
# It builds and runs fine, but there's no easy way to test it in CI
if [ "${{ matrix.target }}" = "aarch64-apple-darwin" ]; then
$CARGO build --target ${{ matrix.target }}
else
$CARGO test --target ${{ matrix.target }}
fi

0 comments on commit 662c10b

Please sign in to comment.