Skip to content

add solidity release.yml (#31) #1

add solidity release.yml (#31)

add solidity release.yml (#31) #1

Workflow file for this run

name: Build and Publish Binary
on:
push:
tags-ignore:
- v1.*
release:
types: [published, created]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
compile_macOS_release:
name: upload standard binary of macOS x86
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 5
- name: Configure
run: |
mkdir build && cd build
- name: Compile solc
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j2
- name: Store binary
run: |
mkdir bin
mv build/solc/solc bin/
tar -cvzf solc-x86.tgz bin/solc
- name: Compile GM solc
run: |
cd build && rm -rf CMakeCache.txt
cmake -DBUILD_GM=ON ..
make -j2
- name: Store GM binary
run: |
mv build/solc/solc bin/
tar -cvzf solc-x86-gm.tgz bin/solc
- name: Upload solc binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: solc-x86.tgz
asset_name: solc-mac-x86.tar.gz
tag: ${{ github.ref }}
overwrite: true
- name: Upload GM solc binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: solc-x86-gm.tgz
asset_name: solc-mac-x86-gm.tar.gz
tag: ${{ github.ref }}
overwrite: true
compile_macOS_arm_release:
name: upload standard binary of macOS arm64
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 5
- name: Configure
run: |
mkdir build && cd build
- name: Compile solc
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_PROCESSOR=aarch64 ..
make -j2
- name: Store binary
run: |
mkdir bin
mv build/solc/solc bin/
tar -cvzf solc-arrch64.tgz bin/solc
- name: Compile GM solc
run: |
cd build
cmake -DBUILD_GM=ON ..
make -j2
- name: Store GM binary
run: |
mv build/solc/solc bin/
tar -cvzf solc-arrch64-gm.tgz bin/solc
- name: Upload solc binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: solc-arrch64.tgz
asset_name: solc-mac-arrch64.tar.gz
tag: ${{ github.ref }}
overwrite: true
- name: Upload GM solc binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: solc-arrch64-gm.tgz
asset_name: solc-mac-arrch64-gm.tar.gz
tag: ${{ github.ref }}
overwrite: true
compile_windows_release:
name: upload standard binary of Windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 5
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: install Prerequisites
run: |
.\scripts\install_deps.ps1
- name: Configure and Compile solc
run: |
mkdir build
cd build
cmake -G "Visual Studio 16 2019" -DUSE_Z3=OFF ..
cmake --build . -j 10 --target install --config Release
- name: Store binary
run: |
mkdir bin
copy build\solc\Release\solc.exe bin\
7z a solc.zip .\bin\solc.exe
- name: Compile GM solc
run: |
cd build
cmake -G "Visual Studio 16 2019" -DUSE_Z3=OFF -DBUILD_GM=ON ..
cmake --build . -j 10 --target install --config Release
- name: Store GM binary
run: |
copy build\solc\Release\solc.exe bin\
7z a solc-gm.zip .\bin\solc.exe
- name: Upload solc binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: solc.zip
asset_name: solc-win.zip
tag: ${{ github.ref }}
overwrite: true
- name: Upload GM solc binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: solc-gm.zip
asset_name: solc-win-gm.zip
tag: ${{ github.ref }}
compile_linux_x86_release:
name: upload standard binary of Linux x86
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 5
- name: Configure
run: |
sudo add-apt-repository ppa:ethereum/ethereum
sudo add-apt-repository ppa:ethereum/ethereum-dev
sudo apt-get update
sudo apt-get install solc
sudo apt-get install z3
mkdir build && cd build
- name: Compile solc
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_Z3=OFF ..
make -j2
- name: Store binary
run: |
mkdir bin
mv build/solc/solc bin/
tar -cvzf solc-x86.tgz bin/solc
- name: Compile GM solc
run: |
cd build
cmake -DBUILD_GM=ON -DUSE_Z3=OFF ..
make -j2
- name: Store GM binary
run: |
mv build/solc/solc bin/
tar -cvzf solc-x86-gm.tgz bin/solc
- name: Upload solc binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: solc-x86.tgz
asset_name: solc-linux.tar.gz
tag: ${{ github.ref }}
overwrite: true
- name: Upload GM solc binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: solc-x86-gm.tgz
asset_name: solc-linux-gm.tar.gz
tag: ${{ github.ref }}
overwrite: true