Skip to content

fix(project) I fixed the windows workflow. #4

fix(project) I fixed the windows workflow.

fix(project) I fixed the windows workflow. #4

name: Thrust Compiler (Windows x86_64)
on:
push:
tags:
- 'thrustc-x86_64-windows-msvc-v*.*.*'
jobs:
thrustc-x86_64-windows-msvc:
runs-on: windows-latest
permissions:
contents: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Generating Unique ID
shell: pwsh
run: |
$BASE_NAME = "${env:GITHUB_REF}" -replace '^refs/tags/',''
$VERSION = $BASE_NAME -replace '^thrustc-x86_64-windows-msvc-',''
$BUILD_ID = "${BASE_NAME}-${env:GITHUB_RUN_ID}"
echo "BUILD_ID=$BUILD_ID" >> $env:GITHUB_ENV
echo "TAG_NAME=$BASE_NAME" >> $env:GITHUB_ENV
echo "VERSION=$VERSION" >> $env: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: Setup MSVC
uses: TheMrMilchmann/setup-msvc-dev@v4
with:
arch: x64
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup CMake and Ninja
uses: lukka/get-cmake@latest
- name: Installing dependencies
shell: pwsh
run: |
Invoke-WebRequest -Uri https://sh.rustup.rs -OutFile rustup-init.sh
./rustup-init.sh -y
$env:PATH += ";$env:USERPROFILE\.cargo\bin"
- 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: |
cargo run -- --llvm-major 18 `
--llvm-minor 0 `
--llvm-patch 8 `
--llvm-c-compiler "cl" `
--llvm-cpp-compiler "cl"
- name: Installing and Configuring Build Cache
run: |
cargo install sccache
working-directory: thrustc
- name: Building Thrust Compiler
run: |
cargo build --release
working-directory: thrustc
- 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``
files: |
thrustc/target/release/thrustc
draft: false