Bumping 'thrustc-x86_64-windows-msvc-v0.1.3' #2
Workflow file for this run
This file contains hidden or 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
| name: Thrust Compiler (macOS - Aarch64) | |
| on: | |
| push: | |
| tags: | |
| - 'thrustc-aarch64-macos-v*.*.*' | |
| jobs: | |
| thrustc-aarch64-macos: | |
| runs-on: macos-latest | |
| permissions: | |
| contents: write | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Generating Unique ID | |
| run: | | |
| BASE_NAME=$(echo "$GITHUB_REF" | sed 's|^refs/tags/||') | |
| VERSION=$(echo "$BASE_NAME" | sed 's|^thrustc-aarch64-macos-||') | |
| BUILD_ID="${BASE_NAME}-${GITHUB_RUN_ID}" | |
| echo "BUILD_ID=$BUILD_ID" >> $GITHUB_ENV | |
| echo "TAG_NAME=$BASE_NAME" >> $GITHUB_ENV | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "Unique ID: $BUILD_ID" | |
| echo "Version: $VERSION" | |
| - name: Cloning Thrust Compiler | |
| run: | | |
| git clone --depth 1 https://github.com/thrustlang/thrustc | |
| - name: Reading Changelog | |
| run: | | |
| CHANGELOG_PATH="thrustc/changelogs/${{ env.TAG_NAME }}/README.md" | |
| if [ ! -f "$CHANGELOG_PATH" ]; then | |
| echo "::error::No changelog found for tag '${{ env.TAG_NAME }}'. A changelog must exist at $CHANGELOG_PATH before releasing a compiler version." | |
| exit 1 | |
| fi | |
| CHANGELOG_CONTENT=$(cat "$CHANGELOG_PATH") | |
| { | |
| echo "CHANGELOG<<EOF" | |
| echo "$CHANGELOG_CONTENT" | |
| echo "EOF" | |
| } >> $GITHUB_ENV | |
| echo "Version changelog loaded successfully." | |
| - name: Removing pre-installed LLVM/Clang versions | |
| run: | | |
| for pkg in $(brew list | grep -E '^llvm(@[0-9]+)?$|^clang-format(@[0-9]+)?$'); do | |
| brew uninstall --ignore-dependencies "$pkg" || true | |
| done | |
| - name: Installing Rust | |
| run: | | |
| curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh -s -- -y | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Installing dependencies | |
| run: | | |
| brew install cmake ninja zstd | |
| brew install llvm@18 | |
| echo "$(brew --prefix llvm@18)/bin" >> $GITHUB_PATH | |
| - name: Cloning the Compiler Dependency Builder | |
| run: | | |
| git clone --depth 1 https://github.com/thrustlang/compiler-dependency-builder | |
| - name: Running the Compiler Dependency Builder | |
| run: | | |
| LLVM_PREFIX=$(brew --prefix llvm@18) | |
| SDKROOT=$(xcrun --sdk macosx --show-sdk-path) | |
| export LLVM_PREFIX | |
| export SDKROOT | |
| cargo run -- --llvm-major 17 \ | |
| --llvm-minor 0 \ | |
| --llvm-patch 6 \ | |
| --llvm-libcpp true \ | |
| --llvm-c-flags "-isysroot $SDKROOT" \ | |
| --llvm-cpp-flags "-nostdinc++ -isystem $LLVM_PREFIX/include/c++/v1 -isysroot $SDKROOT" | |
| working-directory: compiler-dependency-builder | |
| - name: Installing and Configuring Build Cache | |
| run: | | |
| cargo install sccache | |
| working-directory: thrustc | |
| - name: Building Thrust Compiler | |
| run: | | |
| export LIBRARY_PATH="$(brew --prefix zstd)/lib:${LIBRARY_PATH:-}" | |
| cargo build --release | |
| working-directory: thrustc | |
| - name: Extracting File Type and Dynamic Dependencies | |
| run: | | |
| BINARY="thrustc/target/release/thrustc" | |
| DYLIB_OUTPUT=$(otool -L "$BINARY" 2>/dev/null || echo "Could not inspect binary") | |
| FILE_OUTPUT=$(file "$BINARY" 2>/dev/null || echo "Could not determine file type") | |
| { | |
| echo "DYNAMIC_DEPS<<EOF" | |
| echo "$DYLIB_OUTPUT" | |
| echo "EOF" | |
| } >> $GITHUB_ENV | |
| { | |
| echo "FILE_TYPE<<EOF" | |
| echo "$FILE_OUTPUT" | |
| echo "EOF" | |
| } >> $GITHUB_ENV | |
| - name: Releasing Thrust Compiler | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ env.TAG_NAME }} | |
| name: ${{ env.TAG_NAME }} | |
| body: | | |
| # Thrust Compiler | |
| Version: ${{ env.VERSION }} | |
| ## Backends | |
| ### LLVM | |
| Architecture targets for which the compiler was compiled. | |
| - ``x86_64`` | |
| - ``AArch64`` | |
| - ``RISC-V`` | |
| - ``ARM`` | |
| - ``MIPS`` | |
| - ``PowerPC`` | |
| - ``SystemZ`` | |
| - ``AMDGPU`` | |
| - ``Hexagon`` | |
| - ``Lanai`` | |
| - ``LoongArch`` | |
| - ``MSP430`` | |
| - ``NVPTX`` | |
| - ``SPARC`` | |
| - ``XCore`` | |
| - ``BPF`` | |
| - ``SPIR-V`` | |
| - ``WebAssembly`` | |
| ${{ env.CHANGELOG }} | |
| ## File Type | |
| ${{ env.FILE_TYPE }} | |
| ## Dynamic Dependencies | |
| ${{ env.DYNAMIC_DEPS }} | |
| files: | | |
| thrustc/target/release/thrustc | |
| draft: false |