Skip to content

Commit

Permalink
Simplify make.sh to use a single target instead of targets (#1137)
Browse files Browse the repository at this point in the history
* Simplify make.sh to use a single target instead of targets

* Fix darwin sdk mismatch and move to 18.
  • Loading branch information
prasannavl authored Mar 10, 2022
1 parent bb394be commit 76c94bb
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 104 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dev-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Build and package
run: TARGETS="x86_64-pc-linux-gnu" ./make.sh docker-release-git
run: TARGET="x86_64-pc-linux-gnu" ./make.sh docker-release-git

- name: Publish artifact - x86_64-pc-linux-gnu
uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Build and package
run: TARGETS="x86_64-w64-mingw32" ./make.sh docker-release-git
run: TARGET="x86_64-w64-mingw32" ./make.sh docker-release-git

- name: Publish artifact - x86_64-w64-mingw32
uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571
Expand All @@ -94,7 +94,7 @@ jobs:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Build and package
run: TARGETS="x86_64-apple-darwin18" ./make.sh docker-release-git
run: TARGET="x86_64-apple-darwin18" ./make.sh docker-release-git

- name: Publish artifact - x86_64-apple-darwin18
uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/hotfix-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Build and package
run: TARGETS="x86_64-w64-mingw32" ./make.sh docker-release-git
run: TARGET="x86_64-w64-mingw32" ./make.sh docker-release-git

- name: Publish artifact - x86_64-w64-mingw32
uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571
Expand All @@ -69,10 +69,10 @@ jobs:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Build and package
run: TARGETS="x86_64-apple-darwin11" ./make.sh docker-release-git
run: TARGET="x86_64-apple-darwin18" ./make.sh docker-release-git

- name: Publish artifact - x86_64-apple-darwin11
- name: Publish artifact - x86_64-apple-darwin18
uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571
with:
name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11.tar.gz
name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin18
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin18.tar.gz
4 changes: 2 additions & 2 deletions .github/workflows/jellyfish-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jobs:
- name: Set build version
run: |
cd defichain
TARGETS="x86_64-pc-linux-gnu" ./make.sh git_version
TARGET="x86_64-pc-linux-gnu" ./make.sh git_version
- name: Build and package
run: |
echo ">>> BUILD VERSION <<<"
echo ${BUILD_VERSION}
cd defichain
TARGETS="x86_64-pc-linux-gnu" ./make.sh docker-release-git
TARGET="x86_64-pc-linux-gnu" ./make.sh docker-release-git
docker tag defichain-x86_64-pc-linux-gnu:$BUILD_VERSION defichain-x86_64-pc-linux-gnu:dockerhub-latest
docker build -t test-build-container -f ./contrib/dockerfiles/dockerhub/x86_64-pc-linux-gnu.dockerfile .
Expand Down
56 changes: 29 additions & 27 deletions .github/workflows/release-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build and package
run: ./make.sh docker-release-git

- name: Publish artifacts
uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571
uses: actions/upload-artifact@v3
with:
name: defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu.tar.gz
Expand All @@ -31,7 +33,7 @@ jobs:
docker tag defichain-x86_64-pc-linux-gnu:${{ env.BUILD_VERSION }}
defichain-x86_64-pc-linux-gnu:dockerhub-latest
- uses: docker/build-push-action@3e7a4f6646880c6f63758d73ac32392d323eaf8f
- uses: docker/build-push-action@v2
# Make sure to only build on ain repo. Also add in additional restrictions here if needed to
# make sure we don't push unnecessary images to docker
if: ${{ github.repository == 'DeFiCh/ain' }}
Expand All @@ -50,13 +52,13 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- uses: actions/checkout@v3

- name: Build and package
run: TARGETS="x86_64-w64-mingw32" ./make.sh docker-release-git
run: TARGET="x86_64-w64-mingw32" ./make.sh docker-release-git

- name: Publish artifact - x86_64-w64-mingw32
uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571
uses: actions/upload-artifact@v3
with:
name: defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.tar.gz
Expand All @@ -68,16 +70,16 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- uses: actions/checkout@v3

- name: Build and package
run: TARGETS="x86_64-apple-darwin11" ./make.sh docker-release-git
run: TARGET="x86_64-apple-darwin18" ./make.sh docker-release-git

- name: Publish artifact - x86_64-apple-darwin11
uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571
- name: Publish artifact - x86_64-apple-darwin18
uses: actions/upload-artifact@v3
with:
name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11.tar.gz
name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin18
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin18.tar.gz

create-release:
needs:
Expand All @@ -90,7 +92,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- uses: actions/checkout@v3

- name: compute build version
run: ./make.sh git-version
Expand All @@ -99,7 +101,7 @@ jobs:
run: rm -rf *

- name: get all build artifacts
uses: actions/download-artifact@4a7a711286f30c025902c28b541c10e147a9b843
uses: actions/download-artifact@v3

- name: zip package for windows
run: |
Expand All @@ -111,7 +113,7 @@ jobs:
- name: Get Release by Tag
id: get_release_by_tag
uses: jonfriesen/get-release-by-tag@77560d8bbb6096f823ca949d556a1e48c0a60cd0
uses: jonfriesen/get-release-by-tag@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -123,11 +125,11 @@ jobs:
sha256sum ./defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu.tar.gz > ./defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu.tar.gz.SHA256
cd .. && cd ./defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32
sha256sum ./defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip > ./defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.zip.SHA256
cd .. && cd ./defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11
sha256sum ./defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11.tar.gz > ././defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11.tar.gz.SHA256
cd .. && cd ./defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin18
sha256sum ./defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin18.tar.gz > ././defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin18.tar.gz.SHA256
- name: Upload release asset - linux
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -137,7 +139,7 @@ jobs:
asset_content_type: application/gzip

- name: Upload checksum - linux
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -147,7 +149,7 @@ jobs:
asset_content_type: text/plain

- name: Upload release asset - windows
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -157,7 +159,7 @@ jobs:
asset_content_type: application/zip

- name: Upload checksum asset - windows
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -167,21 +169,21 @@ jobs:
asset_content_type: text/plain

- name: Upload release asset - macos
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_by_tag.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11.tar.gz
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11.tar.gz
asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin18/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin18.tar.gz
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin18.tar.gz
asset_content_type: application/gzip

- name: Upload checksum asset - macos
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_by_tag.outputs.upload_url }}
asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11.tar.gz.SHA256
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin11.tar.gz.SHA256
asset_path: ./defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin18/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin18.tar.gz.SHA256
asset_name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin18.tar.gz.SHA256
asset_content_type: text/plain
Loading

0 comments on commit 76c94bb

Please sign in to comment.