-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
158 additions
and
115 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.dockerignore | ||
.git | ||
.gitignore | ||
/target |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: install-llvm | ||
description: "Builds and installs LLVM from source using install-llvm-from-source tasks" | ||
|
||
inputs: | ||
version: | ||
description: "The version of LLVM to install." | ||
required: true | ||
os: | ||
description: "The OS being built upon." | ||
required: true | ||
directory: | ||
description: "The directory to install LLVM binaries to." | ||
required: true | ||
target: | ||
description: "The build script target." | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: LLVM install cache | ||
id: cache-llvm | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ inputs.directory }} | ||
key: llvm-${{ inputs.version }}-${{ inputs.arch }}-${{ inputs.os }}-${{ inputs.target }} | ||
restore-keys: llvm-${{ inputs.version }}-${{ inputs.arch }}-${{ inputs.os }}-${{ inputs.target }} | ||
|
||
- name: Linux - Install build dependencies, ninja | ||
run: sudo apt-get install -y ninja-build | ||
shell: pwsh | ||
if: ${{ (inputs.os == 'ubuntu-20.04') && (steps.cache-llvm.outputs.cache-hit != 'true') }} | ||
- name: Windows - Install build dependencies, ninja | ||
run: | | ||
choco install --accept-license -y ninja | ||
choco uninstall -y llvm | ||
shell: pwsh | ||
if: ${{ (inputs.os == 'windows-2019') && (steps.cache-llvm.outputs.cache-hit != 'true') }} | ||
- name: MacOS - Install build dependencies, ninja | ||
run: brew install ninja | ||
shell: pwsh | ||
if: ${{ (inputs.os == 'macos-11') && (steps.cache-llvm.outputs.cache-hit != 'true') }} | ||
|
||
- name: Configure long paths | ||
run: git config --global core.longpaths true | ||
shell: pwsh | ||
if: ${{ steps.cache-llvm.outputs.cache-hit != 'true' }} | ||
|
||
- name: Configure LLVM Environment | ||
run: | | ||
Write-Output "QIRLIB_CACHE_DIR=${{ inputs.directory }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
Write-Output "LLVM_SYS_${{ inputs.version }}0_PREFIX=${{ inputs.directory }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
Write-Output "PYQIR_LLVM_FEATURE_VERSION=llvm${{ inputs.version }}-0" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | ||
shell: pwsh | ||
|
||
- name: Install LLVM | ||
run: | | ||
$target_prefix = if("${{ inputs.target }}" -eq "manylinux") {"manylinux-"} else {""} | ||
./build.ps1 -t "$($target_prefix)install-llvm-from-source" | ||
shell: pwsh | ||
if: ${{ steps.cache-llvm.outputs.cache-hit != 'true' }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: rust-toolchain | ||
inputs: | ||
toolchain: | ||
required: false | ||
components: | ||
required: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- shell: pwsh | ||
run: | | ||
rustup override set ${{ inputs.toolchain || 'stable' }} | ||
${{ inputs.components && format('rustup component add {0}', inputs.components) }} | ||
cargo --version | ||
rustc --version |
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
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
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
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
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
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
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
Oops, something went wrong.