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:
Alexander Theißen
2025-03-01 13:49:04 +01:00
committed by GitHub
parent 76f4cf71d6
commit 66f9a4d64f
3 changed files with 26 additions and 14 deletions
+10 -6
View File
@@ -3,12 +3,6 @@ name: "Install Solidity Compiler"
runs:
using: "composite"
steps:
- name: Put Solc Direcotry into PATH
shell: bash
run: |
mkdir -p solc
echo "$(pwd)/solc/" >> $GITHUB_PATH
- name: Figure out Solc Download URL
shell: bash
run: |
@@ -23,9 +17,19 @@ runs:
- name: Download Solc
shell: bash
run: |
mkdir -p solc
curl -sSL --output solc/solc https://github.com/ethereum/solidity/releases/download/v0.8.28/${SOLC_NAME}
- name: Make Solc Executable
if: ${{ runner.os == 'Windows' }}
shell: bash
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
+15 -7
View File
@@ -62,7 +62,7 @@ jobs:
build:
strategy:
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:
- target: x86_64-unknown-linux-musl
type: musl
@@ -73,6 +73,9 @@ jobs:
- target: x86_64-apple-darwin
type: native
runner: macos-13
- target: x86_64-pc-windows-msvc
type: native
runner: windows-2022
if: ${{ needs.check-version-changed.outputs.TAG == 'new' }}
runs-on: ${{ matrix.runner }}
needs: [check-version-changed]
@@ -91,10 +94,11 @@ jobs:
- name: Build
if: ${{ matrix.type == 'native' }}
shell: bash
run: |
export LLVM_SYS_181_PREFIX=$PWD/llvm-${{ matrix.target }}
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
if: ${{ matrix.type == 'musl' }}
@@ -113,6 +117,7 @@ jobs:
uses: ./.github/actions/get-solc
- name: Basic Sanity Check
shell: bash
run: |
result=$(./resolc-${{ matrix.target }} --bin crates/integration/contracts/flipper.sol)
echo $result
@@ -121,7 +126,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: resolc-${{ matrix.target }}
path: resolc-${{ matrix.target }}
path: resolc-${{ matrix.target }}*
retention-days: 1
build-wasm:
@@ -209,7 +214,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: resolc-wasm32-unknown-emscripten.tar.gz
name: resolc-wasm32-unknown-emscripten
path: resolc-wasm32-unknown-emscripten.tar.gz
retention-days: 1
@@ -235,15 +240,17 @@ jobs:
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-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
uses: softprops/action-gh-release@v2
with:
body: |
${{ needs.tag.outputs.RELEASE_NOTES }}
## Changelog
${{ needs.check-version-changed.outputs.RELEASE_NOTES }}
# Note for macOS Users
The macOS binary is unsigned and it needs to be made runnable using `xattr -c resolc-macos`.
## Note for macOS Users
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 }}
name: ${{ needs.check-version-changed.outputs.PKG_VER }}
draft: true
@@ -252,3 +259,4 @@ jobs:
resolc-x86_64-unknown-linux-musl.tar.gz
resolc-universal-apple-darwin.tar.gz
resolc-wasm32-unknown-emscripten.tar.gz
resolc-x86_64-pc-windows-msvc.zip
+1 -1
View File
@@ -96,7 +96,7 @@ fn main() {
revive_build_utils::llvm_cxx_flags()
.split_whitespace()
.fold(&mut cc::Build::new(), |builder, flag| builder.flag(flag))
.flag("-Wno-unused-parameter")
.warnings(false)
.cpp(true)
.file("src/linker.cpp")
.compile("liblinker.a");