diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000000..48f1b483f0c9 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 + + + diff --git a/cmake/ProjectBoost.cmake b/cmake/ProjectBoost.cmake index 722b330410ee..93dc90df93c9 100644 --- a/cmake/ProjectBoost.cmake +++ b/cmake/ProjectBoost.cmake @@ -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) @@ -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) \ No newline at end of file +unset(SOURCE_DIR) diff --git a/scripts/install_deps.ps1 b/scripts/install_deps.ps1 index 26a9e116f054..661ad1d923db 100644 --- a/scripts/install_deps.ps1 +++ b/scripts/install_deps.ps1 @@ -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.' }