Skip to content

Commit

Permalink
only build linux
Browse files Browse the repository at this point in the history
  • Loading branch information
smk762 committed Nov 8, 2023
1 parent 188183a commit 41dc341
Showing 1 changed file with 3 additions and 93 deletions.
96 changes: 3 additions & 93 deletions .github/workflows/komodod_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,87 +80,17 @@ jobs:
- name: Push to docker hub
uses: actions-hub/docker@master
with:
args: push komodoofficial/komodo:cd_release_${{ steps.shortify_commit.outputs.sha_short }}_${{ steps.extract_branch.outputs.branch }}

osx-build:
name: OSX Build
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install deps (macOS)
run: |
brew update
brew upgrade || true
brew tap discoteq/discoteq; brew install flock
brew install autoconf autogen automake
brew install gcc@8
brew install binutils
brew install protobuf
brew install coreutils
brew install wget
brew install python3
brew install gmp
- name: Build (macOS)
run: |
./zcutil/build-mac.sh -j4
zip --junk-paths komodo-osx src/komodod src/komodo-cli
- name: Upload komodo-osx.zip as artifact
uses: actions/upload-artifact@v1
with:
name: komodo-osx
path: ./komodo-osx.zip

windows-build:
name: Windows Build (mingw)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install deps (Windows)
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update # prevents repo404 errors on apt-remove below
sudo apt-get remove php* msodbcsql17 mysql* powershell containernetworking-* containers* dotn*
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool \
libncurses-dev unzip wget bsdmainutils automake libboost-all-dev libssl-dev \
libprotobuf-dev protobuf-compiler libqrencode-dev libdb++-dev ntp ntpdate nano \
software-properties-common curl libevent-dev libcurl4-gnutls-dev cmake clang \
libsodium-dev ncurses-dev git python3 python3-zmq zlib1g-dev mingw-w64 -y
curl https://sh.rustup.rs -sSf | sh -s -- -y
source $HOME/.cargo/env
rustup target add x86_64-pc-windows-gnu
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
- name: Build (Windows)
run: |
./zcutil/build-win.sh -j$(nproc)
zip --junk-paths komodo-win src/komodod.exe src/komodo-cli.exe
- name: Upload komodo-win.zip as artifact
uses: actions/upload-artifact@v1
with:
name: komodo-win
path: ./komodo-win.zip
args: push ${{ secrets.DOCKER_ORG }}/komodo:cd_release_${{ steps.shortify_commit.outputs.sha_short }}_${{ steps.extract_branch.outputs.branch }}

publish-release:
name: Publishing CD releases
runs-on: ubuntu-20.04
needs: [linux-build, osx-build, windows-build]
needs: [linux-build]
steps:
- name: Download komodo-linux.zip
uses: actions/download-artifact@v1
with:
name: komodo-linux
- name: Download komodo-osx.zip
uses: actions/download-artifact@v1
with:
name: komodo-osx
- name: Download komodo-win.zip
uses: actions/download-artifact@v1
with:
name: komodo-win

- name: Extract branch name
shell: bash
Expand Down Expand Up @@ -191,24 +121,4 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: komodo-linux/komodo-linux.zip
asset_name: komodo_${{ steps.shortify_commit.outputs.sha_short }}_${{ steps.extract_branch.outputs.branch }}_linux.zip
asset_content_type: application/zip
- name: Upload OSX Release Asset
id: upload-osx-release-asset
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: komodo-osx/komodo-osx.zip
asset_name: komodo_${{ steps.shortify_commit.outputs.sha_short }}_${{ steps.extract_branch.outputs.branch }}_osx.zip
asset_content_type: application/zip
- name: Upload Windows Release Asset
id: upload-windows-release-asset
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: komodo-win/komodo-win.zip
asset_name: komodo_${{ steps.shortify_commit.outputs.sha_short }}_${{ steps.extract_branch.outputs.branch }}_win.zip
asset_content_type: application/zip
asset_content_type: application/zip

0 comments on commit 41dc341

Please sign in to comment.