update vscode #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- 'v*' | |
name: Build Release Binaries | |
jobs: | |
linux-x86-64: | |
name: Linux x86-64 | |
runs-on: solang-ubuntu-latest | |
container: ghcr.io/hyperledger/solang-llvm:ci-7 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3.1.0 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@1.74.0 | |
- name: Build | |
run: cargo build --verbose --release | |
- name: Run tests | |
run: cargo test --workspace --verbose --release | |
- name: Upload binary | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: target/release/solang | |
asset_name: solang-linux-x86-64 | |
tag: ${{ github.ref }} | |
linux-arm64: | |
name: Linux arm64 | |
runs-on: linux-arm64 | |
if: ${{ github.repository_owner == 'hyperledger' }} | |
container: ghcr.io/hyperledger/solang-llvm:ci-7 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3.1.0 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@1.74.0 | |
- name: Build | |
run: cargo build --verbose --release | |
- name: Run tests | |
run: cargo test --workspace --verbose --release | |
- name: Upload binary | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: target/release/solang | |
asset_name: solang-linux-arm64 | |
tag: ${{ github.ref }} | |
windows: | |
name: Windows | |
runs-on: windows-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Download LLVM | |
run: curl -sSL -o c:\llvm.zip https://github.com/hyperledger/solang-llvm/releases/download/llvm16-0/llvm16.0-win.zip | |
- name: Extract LLVM | |
run: unzip c:\llvm.zip -d c:/ | |
- name: Add LLVM to Path | |
run: echo "c:\llvm16.0\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 | |
- uses: dtolnay/rust-toolchain@1.74.0 | |
with: | |
components: clippy | |
- name: Build | |
run: cargo build --release --verbose | |
- name: Run tests | |
run: cargo test --workspace --release --verbose | |
- name: Upload binary | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: target/release/solang.exe | |
asset_name: solang.exe | |
tag: ${{ github.ref }} | |
mac-arm: | |
name: Mac Arm | |
runs-on: macos-13-xlarge | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@1.74.0 | |
- name: Get LLVM | |
run: curl -sSL --output llvm16.0-mac-arm.tar.xz https://github.com/hyperledger/solang-llvm/releases/download/llvm16-0/llvm16.0-mac-arm.tar.xz | |
- name: Extract LLVM | |
run: tar Jxf llvm16.0-mac-arm.tar.xz | |
- name: Add LLVM to Path | |
run: echo "$(pwd)/llvm16.0/bin" >> $GITHUB_PATH | |
- name: Build | |
run: cargo build --release --verbose | |
- name: Run tests | |
run: cargo test --workspace --release --verbose | |
- name: Upload binary | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: target/release/solang | |
asset_name: solang-mac-arm | |
tag: ${{ github.ref }} | |
mac-intel: | |
name: Mac Intel | |
# The Hyperledger self-hosted intel macs have the label macos-latest | |
# and run macos 12. We don't want to build llvm on macos 12, because | |
# then it can't be used on macos 11. | |
runs-on: macos-11 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@1.74.0 | |
- name: Get LLVM | |
run: wget -q -O llvm16.0-mac-intel.tar.xz https://github.com/hyperledger/solang-llvm/releases/download/llvm16-0/llvm16.0-mac-intel.tar.xz | |
- name: Extract LLVM | |
run: tar Jxf llvm16.0-mac-intel.tar.xz | |
- name: Add LLVM to Path | |
run: echo "$(pwd)/llvm16.0/bin" >> $GITHUB_PATH | |
- name: Build | |
run: cargo build --release --verbose | |
- name: Run tests | |
run: cargo test --workspace --release --verbose | |
- name: Upload binary | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: target/release/solang | |
asset_name: solang-mac-intel | |
tag: ${{ github.ref }} | |
mac-universal: | |
name: Mac Universal Binary | |
runs-on: macos-latest | |
needs: [mac-arm, mac-intel] | |
steps: | |
- run: | | |
curl -sSL --output solang-mac-intel https://github.com/hyperledger/solang/releases/download/${GITHUB_REF/refs\/tags\//}/solang-mac-intel | |
curl -sSL --output solang-mac-arm https://github.com/hyperledger/solang/releases/download/${GITHUB_REF/refs\/tags\//}/solang-mac-arm | |
lipo -create -output solang-mac solang-mac-intel solang-mac-arm | |
- name: Upload binary | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: solang-mac | |
asset_name: solang-mac | |
tag: ${{ github.ref }} | |
container: | |
name: Container Image | |
runs-on: solang-ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin | |
docker buildx build . \ | |
--push \ | |
--tag ghcr.io/${GITHUB_REPOSITORY}:${GITHUB_REF/refs\/tags\//} \ | |
--label org.opencontainers.image.description="Solidity Compiler for Solana and Polkadot version $(git describe --tags)" |