This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
feat: add platform and arch bin releasing #955
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -42,10 +42,87 @@ jobs: | |
name: windows | ||
path: target/release/wash.exe | ||
|
||
build_bin: | ||
strategy: | ||
matrix: | ||
config: | ||
- target: aarch64-apple-darwin | ||
install-path: /bin/wash | ||
test-bin: file ./result/bin/wash | ||
test-oci: docker load < ./result | ||
|
||
- target: aarch64-linux-android | ||
install-path: /bin/wash | ||
test-bin: file ./result/bin/wash | ||
test-oci: docker load < ./result | ||
|
||
- target: aarch64-unknown-linux-musl | ||
install-path: /bin/wash | ||
test-bin: nix shell --inputs-from . 'nixpkgs#qemu' -c qemu-aarch64 ./result/bin/wash --version | ||
test-oci: docker load < ./result | ||
# TODO: Run aarch64 binary within OCI | ||
|
||
- target: x86_64-apple-darwin | ||
install-path: /bin/wash | ||
test-bin: file ./result/bin/wash | ||
test-oci: docker load < ./result | ||
|
||
- target: x86_64-pc-windows-gnu | ||
install-path: /bin/wash.exe | ||
test-bin: nix shell --inputs-from . 'nixpkgs#wine64' -c wine64 ./result/bin/wash.exe --version | ||
test-oci: docker load < ./result | ||
# TODO: Run win64 binary within OCI | ||
|
||
- target: x86_64-unknown-linux-musl | ||
install-path: /bin/wash | ||
test-bin: ./result/bin/wash --version | ||
test-oci: | | ||
docker load < ./result | ||
docker run --rm wash:$(nix eval --raw .#wash-x86_64-unknown-linux-musl-oci.imageTag) wash --version | ||
|
||
name: wash-${{ matrix.config.target }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/install-nix | ||
with: | ||
cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
- uses: ./.github/actions/build-nix | ||
with: | ||
package: wash-${{ matrix.config.target }} | ||
install-path: ${{ matrix.config.install-path }} | ||
- run: ${{ matrix.config.test-bin }} | ||
- uses: ./.github/actions/build-nix | ||
with: | ||
package: wash-${{ matrix.config.target }}-oci | ||
- run: ${{ matrix.config.test-oci }} | ||
|
||
release: | ||
needs: [cargo_check, clippy_check, windows_build] | ||
needs: [cargo_check, clippy_check, windows_build, build_bin] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wash-aarch64-apple-darwin | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wash-aarch64-linux-android | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wash-aarch64-unknown-linux-musl | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wash-x86_64-apple-darwin | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wash-x86_64-pc-windows-gnu | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wash-x86_64-unknown-linux-musl | ||
- run: chmod +x ./wash-* | ||
# We need to put windows on the release so that chocolatey can download it | ||
- name: Download windows release | ||
uses: actions/download-artifact@v3 | ||
|
@@ -55,7 +132,14 @@ jobs: | |
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: release/windows/wash.exe | ||
files: | | ||
release/windows/wash.exe | ||
wash-aarch64-apple-darwin | ||
wash-aarch64-linux-android | ||
wash-aarch64-unknown-linux-musl | ||
wash-x86_64-apple-darwin | ||
wash-x86_64-pc-windows-gnu | ||
wash-x86_64-unknown-linux-musl | ||
generate_release_notes: true | ||
tag_name: ${{ github.ref_name }} | ||
release_name: Release ${{ github.ref_name }} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
x86_64-pc-windows-gnu
binary the same as the one fromwindows_build
?