-
Notifications
You must be signed in to change notification settings - Fork 28
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 binary build workflow #345
Open
dreacot
wants to merge
10
commits into
crypto-power:master
Choose a base branch
from
dreacot:binary_builds
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1cd7e2a
add binary build workflow
dreacot 3c7a139
test on pr
dreacot 5533e3c
update dockerfile path
dreacot 0acb0fc
update dockerfile path
dreacot 6d76cee
update dockerfile path
dreacot 63aea91
upload binary
dreacot d17e405
upload binary
dreacot 94597b7
upload binary
dreacot 9f3cff2
enable darwin build
dreacot f94362f
attempt darwin build iwth linux
dreacot 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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Cross-Platform Build on New Tag | ||
|
||
on: | ||
pull_request: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- os: linux | ||
arch: amd64 | ||
# Uncomment and add other OS and architecture combinations as needed | ||
# - os: linux | ||
# arch: arm64 | ||
# - os: darwin | ||
# arch: amd64 | ||
- os: darwin | ||
arch: arm64 | ||
# - os: windows | ||
# arch: amd64 | ||
# - os: windows | ||
# arch: 386 | ||
# - os: freebsd | ||
# arch: amd64 | ||
# - os: freebsd | ||
# arch: arm | ||
env: | ||
BUILDOS: ${{ matrix.os }} | ||
BUILDARCH: ${{ matrix.arch }} | ||
BINARY_NAME: cryptopower-${{ matrix.os }}-${{ matrix.arch }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Copy instantswap file | ||
run: cp ./libwallet/instantswap/instant_example.json ./libwallet/instantswap/instant.json | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./reproduciblebuilds/Dockerfile | ||
load: true | ||
platforms: ${{ matrix.os }}/${{ matrix.arch }} | ||
push: false | ||
tags: user/app:latest | ||
build-args: | | ||
BUILDOS=${{ env.BUILDOS }} | ||
BUILDARCH=${{ env.BUILDARCH }} | ||
BUILDNAME=${{ env.BINARY_NAME }} | ||
|
||
- name: Create Container and Copy Binary | ||
run: | | ||
docker create --name temp-container user/app:latest | ||
docker cp temp-container:/app/${{ env.BINARY_NAME }} ./${{ env.BINARY_NAME }} | ||
docker rm temp-container | ||
|
||
- name: Upload Binary | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.BINARY_NAME }} | ||
path: ./${{ env.BINARY_NAME }} |
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
Oops, something went wrong.
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.
Seems it runs on PRs too, not just tags.
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.
Yeah, i added the pr trigger there, so I wouldn't have to be creating and deleting tags, plus so i can test without merging, once i get all binaries building successfully i’d remove the pr trigger