diff --git a/.github/actions/get-solc/action.yml b/.github/actions/get-solc/action.yml new file mode 100644 index 0000000000000..724a19b8b3549 --- /dev/null +++ b/.github/actions/get-solc/action.yml @@ -0,0 +1,37 @@ +name: "Install Solidity Compiler" +description: "Installs the Ethereum solc Solidity compiler frontend executable" + +runs: + using: "composite" + steps: + - name: Figure out Solc Download URL + shell: bash + run: | + if [[ "${{ runner.os }}" == "Linux" ]]; then + echo "SOLC_NAME=solc-static-linux" >> $GITHUB_ENV + elif [[ "${{ runner.os }}" == "Windows" ]]; then + echo "SOLC_NAME=solc-windows.exe" >> $GITHUB_ENV + else + echo "SOLC_NAME=solc-macos" >> $GITHUB_ENV + fi + + - name: Download Solc + shell: bash + run: | + mkdir -p solc + curl -sSL --output solc/solc https://github.com/ethereum/solidity/releases/download/v0.8.30/${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 + xattr -x solc/solc \ No newline at end of file diff --git a/.github/workflows/tests-misc.yml b/.github/workflows/tests-misc.yml index 8223cb2d96854..9f043d2ff4480 100644 --- a/.github/workflows/tests-misc.yml +++ b/.github/workflows/tests-misc.yml @@ -377,8 +377,8 @@ jobs: rustup component add clippy rust-docs rust-src rustfmt rustc rust-std - name: Install protobuf run: brew install protobuf - - name: install solc - run: brew install solidity + - name: Install Solc + uses: ./.github/actions/get-solc - name: Install resolc run: | source $HOME/.cargo/env diff --git a/prdoc/pr_10558.prdoc b/prdoc/pr_10558.prdoc new file mode 100644 index 0000000000000..590193d7815f4 --- /dev/null +++ b/prdoc/pr_10558.prdoc @@ -0,0 +1,5 @@ +title: pin solc version to 0.8.30 in tests-misc.yml +doc: +- audience: Runtime Dev + description: pin solc version to 0.8.30 in tests-misc.yml +crates: []