mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-15 17:21:09 +00:00
Release Windows Version (#251)
With LLVM working only minor changes were necessary to get resolc running on Windows. Release in my branch here: https://github.com/paritytech/revive-alex-workflowtest/releases/tag/v0.1.0-dev.12
This commit is contained in:
committed by
GitHub
parent
76f4cf71d6
commit
66f9a4d64f
@@ -3,12 +3,6 @@ name: "Install Solidity Compiler"
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Put Solc Direcotry into PATH
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
mkdir -p solc
|
|
||||||
echo "$(pwd)/solc/" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: Figure out Solc Download URL
|
- name: Figure out Solc Download URL
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -23,9 +17,19 @@ runs:
|
|||||||
- name: Download Solc
|
- name: Download Solc
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
mkdir -p solc
|
||||||
curl -sSL --output solc/solc https://github.com/ethereum/solidity/releases/download/v0.8.28/${SOLC_NAME}
|
curl -sSL --output solc/solc https://github.com/ethereum/solidity/releases/download/v0.8.28/${SOLC_NAME}
|
||||||
|
|
||||||
- name: Make Solc Executable
|
- name: Make Solc Executable
|
||||||
|
if: ${{ runner.os == 'Windows' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
echo "$(pwd -W)\\solc" >> $GITHUB_PATH
|
||||||
|
mv solc/solc solc/solc.exe
|
||||||
|
|
||||||
|
- name: Make Solc Executable
|
||||||
|
if: ${{ runner.os != 'Windows' }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "$(pwd)/solc" >> $GITHUB_PATH
|
||||||
chmod +x solc/solc
|
chmod +x solc/solc
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: [x86_64-unknown-linux-musl, aarch64-apple-darwin, x86_64-apple-darwin]
|
target: [x86_64-unknown-linux-musl, aarch64-apple-darwin, x86_64-apple-darwin, x86_64-pc-windows-msvc]
|
||||||
include:
|
include:
|
||||||
- target: x86_64-unknown-linux-musl
|
- target: x86_64-unknown-linux-musl
|
||||||
type: musl
|
type: musl
|
||||||
@@ -73,6 +73,9 @@ jobs:
|
|||||||
- target: x86_64-apple-darwin
|
- target: x86_64-apple-darwin
|
||||||
type: native
|
type: native
|
||||||
runner: macos-13
|
runner: macos-13
|
||||||
|
- target: x86_64-pc-windows-msvc
|
||||||
|
type: native
|
||||||
|
runner: windows-2022
|
||||||
if: ${{ needs.check-version-changed.outputs.TAG == 'new' }}
|
if: ${{ needs.check-version-changed.outputs.TAG == 'new' }}
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
needs: [check-version-changed]
|
needs: [check-version-changed]
|
||||||
@@ -91,10 +94,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: ${{ matrix.type == 'native' }}
|
if: ${{ matrix.type == 'native' }}
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
export LLVM_SYS_181_PREFIX=$PWD/llvm-${{ matrix.target }}
|
export LLVM_SYS_181_PREFIX=$PWD/llvm-${{ matrix.target }}
|
||||||
make install-bin
|
make install-bin
|
||||||
mv target/release/resolc resolc-${{ matrix.target }}
|
mv target/release/resolc resolc-${{ matrix.target }} || mv target/release/resolc.exe resolc-${{ matrix.target }}.exe
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: ${{ matrix.type == 'musl' }}
|
if: ${{ matrix.type == 'musl' }}
|
||||||
@@ -113,6 +117,7 @@ jobs:
|
|||||||
uses: ./.github/actions/get-solc
|
uses: ./.github/actions/get-solc
|
||||||
|
|
||||||
- name: Basic Sanity Check
|
- name: Basic Sanity Check
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
result=$(./resolc-${{ matrix.target }} --bin crates/integration/contracts/flipper.sol)
|
result=$(./resolc-${{ matrix.target }} --bin crates/integration/contracts/flipper.sol)
|
||||||
echo $result
|
echo $result
|
||||||
@@ -121,7 +126,7 @@ jobs:
|
|||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: resolc-${{ matrix.target }}
|
name: resolc-${{ matrix.target }}
|
||||||
path: resolc-${{ matrix.target }}
|
path: resolc-${{ matrix.target }}*
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
build-wasm:
|
build-wasm:
|
||||||
@@ -209,7 +214,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: resolc-wasm32-unknown-emscripten.tar.gz
|
name: resolc-wasm32-unknown-emscripten
|
||||||
path: resolc-wasm32-unknown-emscripten.tar.gz
|
path: resolc-wasm32-unknown-emscripten.tar.gz
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
@@ -235,15 +240,17 @@ jobs:
|
|||||||
chmod +x resolc-universal-apple-darwin
|
chmod +x resolc-universal-apple-darwin
|
||||||
tar -czf resolc-x86_64-unknown-linux-musl.tar.gz resolc-x86_64-unknown-linux-musl
|
tar -czf resolc-x86_64-unknown-linux-musl.tar.gz resolc-x86_64-unknown-linux-musl
|
||||||
tar -czf resolc-universal-apple-darwin.tar.gz resolc-universal-apple-darwin
|
tar -czf resolc-universal-apple-darwin.tar.gz resolc-universal-apple-darwin
|
||||||
|
zip -j resolc-x86_64-pc-windows-msvc.zip resolc-x86_64-pc-windows-msvc.exe
|
||||||
|
|
||||||
- name: create-release
|
- name: create-release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
body: |
|
body: |
|
||||||
${{ needs.tag.outputs.RELEASE_NOTES }}
|
## Changelog
|
||||||
|
${{ needs.check-version-changed.outputs.RELEASE_NOTES }}
|
||||||
|
|
||||||
# Note for macOS Users
|
## Note for macOS Users
|
||||||
The macOS binary is unsigned and it needs to be made runnable using `xattr -c resolc-macos`.
|
The macOS binary is unsigned and it needs to be made runnable using `xattr -c resolc-universal-apple-darwin`.
|
||||||
tag_name: ${{ needs.check-version-changed.outputs.PKG_VER }}
|
tag_name: ${{ needs.check-version-changed.outputs.PKG_VER }}
|
||||||
name: ${{ needs.check-version-changed.outputs.PKG_VER }}
|
name: ${{ needs.check-version-changed.outputs.PKG_VER }}
|
||||||
draft: true
|
draft: true
|
||||||
@@ -252,3 +259,4 @@ jobs:
|
|||||||
resolc-x86_64-unknown-linux-musl.tar.gz
|
resolc-x86_64-unknown-linux-musl.tar.gz
|
||||||
resolc-universal-apple-darwin.tar.gz
|
resolc-universal-apple-darwin.tar.gz
|
||||||
resolc-wasm32-unknown-emscripten.tar.gz
|
resolc-wasm32-unknown-emscripten.tar.gz
|
||||||
|
resolc-x86_64-pc-windows-msvc.zip
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ fn main() {
|
|||||||
revive_build_utils::llvm_cxx_flags()
|
revive_build_utils::llvm_cxx_flags()
|
||||||
.split_whitespace()
|
.split_whitespace()
|
||||||
.fold(&mut cc::Build::new(), |builder, flag| builder.flag(flag))
|
.fold(&mut cc::Build::new(), |builder, flag| builder.flag(flag))
|
||||||
.flag("-Wno-unused-parameter")
|
.warnings(false)
|
||||||
.cpp(true)
|
.cpp(true)
|
||||||
.file("src/linker.cpp")
|
.file("src/linker.cpp")
|
||||||
.compile("liblinker.a");
|
.compile("liblinker.a");
|
||||||
|
|||||||
Reference in New Issue
Block a user