diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bb98884..d5973eb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,16 +68,11 @@ jobs: - name: Build run: ./build.sh ${{ matrix.out_dir }} shell: bash - - name: Upload ${{ matrix.tar }} BPF tarball + - name: Upload ${{ matrix.tar }} tarball uses: actions/upload-artifact@v3 with: - name: solana-bpf-tools-${{ matrix.tar }}-x86_64.tar.bz2 - path: solana-bpf-tools-${{ matrix.tar }}-x86_64.tar.bz2 - - name: Upload ${{ matrix.tar }} SBF tarball - uses: actions/upload-artifact@v3 - with: - name: solana-sbf-tools-${{ matrix.tar }}-x86_64.tar.bz2 - path: solana-sbf-tools-${{ matrix.tar }}-x86_64.tar.bz2 + name: platform-tools-${{ matrix.tar }}-x86_64.tar.bz2 + path: platform-tools-${{ matrix.tar }}-x86_64.tar.bz2 release: name: Upload Release Assets @@ -85,30 +80,18 @@ jobs: runs-on: ubuntu-latest if: ${{ startsWith(github.ref, 'refs/tags/v') }} steps: - - name: Download Linux BPF tarball - uses: actions/download-artifact@v3 - with: - name: solana-bpf-tools-linux-x86_64.tar.bz2 - - name: Download macOS BPF tarball + - name: Download Linux tarball uses: actions/download-artifact@v3 with: - name: solana-bpf-tools-osx-x86_64.tar.bz2 - - name: Download Linux SBF tarball + name: platform-tools-linux-x86_64.tar.bz2 + - name: Download macOS tarball uses: actions/download-artifact@v3 with: - name: solana-sbf-tools-linux-x86_64.tar.bz2 - - name: Download macOS SBF tarball + name: platform-tools-osx-x86_64.tar.bz2 + - name: Download Windows tarball uses: actions/download-artifact@v3 with: - name: solana-sbf-tools-osx-x86_64.tar.bz2 - - name: Download Windows BPF tarball - uses: actions/download-artifact@v3 - with: - name: solana-bpf-tools-windows-x86_64.tar.bz2 - - name: Download Windows SBF tarball - uses: actions/download-artifact@v3 - with: - name: solana-sbf-tools-windows-x86_64.tar.bz2 + name: platform-tools-windows-x86_64.tar.bz2 - name: Create Release id: create_release uses: actions/create-release@v1 @@ -119,63 +102,33 @@ jobs: release_name: Release ${{ github.ref }} draft: false prerelease: false - - name: Release Linux BPF tarball - id: upload-release-linux-bpf - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: solana-bpf-tools-linux-x86_64.tar.bz2 - asset_name: solana-bpf-tools-linux-x86_64.tar.bz2 - asset_content_type: application/zip - - name: Release macOS BPF tarball - id: upload-release-macos-bpf - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: solana-bpf-tools-osx-x86_64.tar.bz2 - asset_name: solana-bpf-tools-osx-x86_64.tar.bz2 - asset_content_type: application/zip - - name: Release Linux SBF tarball - id: upload-release-linux-sbf - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: solana-sbf-tools-linux-x86_64.tar.bz2 - asset_name: solana-sbf-tools-linux-x86_64.tar.bz2 - asset_content_type: application/zip - - name: Release macOS SBF tarball - id: upload-release-macos-sbf + - name: Release Linux tarball + id: upload-release-linux uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: solana-sbf-tools-osx-x86_64.tar.bz2 - asset_name: solana-sbf-tools-osx-x86_64.tar.bz2 + asset_path: platform-tools-linux-x86_64.tar.bz2 + asset_name: platform-tools-linux-x86_64.tar.bz2 asset_content_type: application/zip - - name: Release Windows BPF tarball - id: upload-release-windows-bpf + - name: Release macOS tarball + id: upload-release-macos uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: solana-bpf-tools-windows-x86_64.tar.bz2 - asset_name: solana-bpf-tools-windows-x86_64.tar.bz2 + asset_path: platform-tools-osx-x86_64.tar.bz2 + asset_name: platform-tools-osx-x86_64.tar.bz2 asset_content_type: application/zip - - name: Release Windows SBF tarball - id: upload-release-windows-sbf + - name: Release Windows tarball + id: upload-release-windows uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: solana-sbf-tools-windows-x86_64.tar.bz2 - asset_name: solana-sbf-tools-windows-x86_64.tar.bz2 + asset_path: platform-tools-windows-x86_64.tar.bz2 + asset_name: platform-tools-windows-x86_64.tar.bz2 asset_content_type: application/zip diff --git a/build.sh b/build.sh index 04f6d5b..0cf3b1a 100755 --- a/build.sh +++ b/build.sh @@ -7,23 +7,23 @@ case "${unameOut}" in EXE_SUFFIX= if [[ "$(uname -m)" == "arm64" ]] ; then HOST_TRIPLE=aarch64-apple-darwin - ARTIFACT=solana-bpf-tools-osx-aarch64.tar.bz2 + ARTIFACT=platform-tools-osx-aarch64.tar.bz2 else HOST_TRIPLE=x86_64-apple-darwin - ARTIFACT=solana-bpf-tools-osx-x86_64.tar.bz2 + ARTIFACT=platform-tools-osx-x86_64.tar.bz2 fi;; MINGW*) EXE_SUFFIX=.exe HOST_TRIPLE=x86_64-pc-windows-msvc - ARTIFACT=solana-bpf-tools-windows-x86_64.tar.bz2;; + ARTIFACT=platform-tools-windows-x86_64.tar.bz2;; Linux* | *) EXE_SUFFIX= if [[ "$(uname -m)" == "arm64" ]] ; then HOST_TRIPLE=aarch64-unknown-linux-gnu - ARTIFACT=solana-bpf-tools-linux-aarch64.tar.bz2 + ARTIFACT=platform-tools-linux-aarch64.tar.bz2 else HOST_TRIPLE=x86_64-unknown-linux-gnu - ARTIFACT=solana-bpf-tools-linux-x86_64.tar.bz2 + ARTIFACT=platform-tools-linux-x86_64.tar.bz2 fi esac @@ -34,10 +34,10 @@ rm -rf "${OUT_DIR}" mkdir -p "${OUT_DIR}" pushd "${OUT_DIR}" -git clone --single-branch --branch sbf-tools-v1.35 https://github.com/solana-labs/rust.git +git clone --single-branch --branch solana-tools-v1.36 https://github.com/solana-labs/rust.git echo "$( cd rust && git rev-parse HEAD ) https://github.com/solana-labs/rust.git" >> version.md -git clone --single-branch --branch sbf-tools-v1.35 https://github.com/solana-labs/cargo.git +git clone --single-branch --branch solana-tools-v1.36 https://github.com/solana-labs/cargo.git echo "$( cd cargo && git rev-parse HEAD ) https://github.com/solana-labs/cargo.git" >> version.md pushd rust @@ -57,7 +57,7 @@ fi popd if [[ "${HOST_TRIPLE}" != "x86_64-pc-windows-msvc" ]] ; then - git clone --single-branch --branch sbf-tools-v1.35 https://github.com/solana-labs/newlib.git + git clone --single-branch --branch solana-tools-v1.36 https://github.com/solana-labs/newlib.git echo "$( cd newlib && git rev-parse HEAD ) https://github.com/solana-labs/newlib.git" >> version.md mkdir -p newlib_build mkdir -p newlib_install @@ -77,7 +77,7 @@ cp -R "rust/build/${HOST_TRIPLE}/stage1/bin" deploy/rust/ cp -R "cargo/target/release/cargo${EXE_SUFFIX}" deploy/rust/bin/ mkdir -p deploy/rust/lib/rustlib/ cp -R "rust/build/${HOST_TRIPLE}/stage1/lib/rustlib/${HOST_TRIPLE}" deploy/rust/lib/rustlib/ -cp -R "rust/build/${HOST_TRIPLE}/stage1/lib/rustlib/bpfel-unknown-unknown" deploy/rust/lib/rustlib/ +cp -R "rust/build/${HOST_TRIPLE}/stage1/lib/rustlib/sbf-solana-solana" deploy/rust/lib/rustlib/ find . -maxdepth 6 -type f -path "./rust/build/${HOST_TRIPLE}/stage1/lib/*" -exec cp {} deploy/rust/lib \; mkdir -p deploy/rust/lib/rustlib/src/rust cp "rust/build/${HOST_TRIPLE}/stage1/lib/rustlib/src/rust/Cargo.lock" deploy/rust/lib/rustlib/src/rust @@ -155,20 +155,16 @@ EOF tar -C deploy -jcf ${ARTIFACT} . -rm -rf deploy/rust/lib/rustlib/bpfel-unknown-unknown -cp -R "rust/build/${HOST_TRIPLE}/stage1/lib/rustlib/sbf-solana-solana" deploy/rust/lib/rustlib/ -tar -C deploy -jcf ${ARTIFACT/bpf/sbf} . - popd -mv "${OUT_DIR}/${ARTIFACT}" "${OUT_DIR}/${ARTIFACT/bpf/sbf}" . +mv "${OUT_DIR}/${ARTIFACT}" . # Build linux binaries on macOS in docker if [[ "$(uname)" == "Darwin" ]] && [[ $# == 1 ]] && [[ "$1" == "--docker" ]] ; then docker system prune -a -f - docker build -t solanalabs/bpf-tools . - id=$(docker create solanalabs/bpf-tools /build.sh "${OUT_DIR}") + docker build -t solanalabs/platform-tools . + id=$(docker create solanalabs/platform-tools /build.sh "${OUT_DIR}") docker cp build.sh "${id}:/" docker start -a "${id}" - docker cp "${id}:${OUT_DIR}/solana-bpf-tools-linux-x86_64.tar.bz2" "${OUT_DIR}" + docker cp "${id}:${OUT_DIR}/solana-sbf-tools-linux-x86_64.tar.bz2" "${OUT_DIR}" fi