Skip to content
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

0618 #30

Closed
wants to merge 24 commits into from
Closed

0618 #30

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
237 changes: 237 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
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



4 changes: 2 additions & 2 deletions cmake/ProjectBoost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(BOOST_CXXFLAGS "")
if (WIN32)
set(BOOST_BOOTSTRAP_COMMAND bootstrap.bat)
set(BOOST_BUILD_TOOL b2.exe)
set(BOOST_LIBRARY_SUFFIX -vc141-mt-x64-1_68.lib)
set(BOOST_LIBRARY_SUFFIX -vc142-mt-x64-1_76.lib)
elseif(EMSCRIPTEN)
set(BOOST_BOOTSTRAP_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_TOOL ./b2 toolset=emscripten)
Expand Down Expand Up @@ -116,4 +116,4 @@ set_property(TARGET Boost::Serialization PROPERTY IMPORTED_LOCATION ${BOOST_LIB_
set_property(TARGET Boost::Serialization PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${BOOST_INCLUDE_DIR})
add_dependencies(Boost::Serialization boost)

unset(SOURCE_DIR)
unset(SOURCE_DIR)
2 changes: 1 addition & 1 deletion scripts/install_deps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if ( -not (Test-Path "$PSScriptRoot\..\deps\boost") ) {

# FIXME: The default user agent results in Artifactory treating Invoke-WebRequest as a browser
# and serving it a page that requires JavaScript.
Invoke-WebRequest -URI "https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.zip" -OutFile boost.zip -UserAgent ""
Invoke-WebRequest -URI "https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.zip" -OutFile boost.zip
if ((Get-FileHash boost.zip).Hash -ne "c86bd9d9eef795b4b0d3802279419fde5221922805b073b9bd822edecb1ca28e") {
throw 'Downloaded Boost source package has wrong checksum.'
}
Expand Down