forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'codon-17' into release/17.x
- Loading branch information
Showing
6 changed files
with
255 additions
and
44 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,3 @@ | ||
FROM quay.io/pypa/manylinux2014_x86_64 | ||
COPY entrypoint.sh /entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] |
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,5 @@ | ||
name: manylinux build | ||
description: Builds LLVM on manylinux | ||
runs: | ||
using: docker | ||
image: Dockerfile |
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,29 @@ | ||
#!/bin/sh -l | ||
set -e | ||
|
||
# setup | ||
cd /github/workspace | ||
yum -y update | ||
yum -y install ninja-build | ||
|
||
# compile LLVM | ||
cmake -S llvm -B build-llvm -G Ninja \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DLLVM_INCLUDE_TESTS=OFF \ | ||
-DLLVM_ENABLE_RTTI=ON \ | ||
-DLLVM_ENABLE_ZLIB=OFF \ | ||
-DLLVM_ENABLE_TERMINFO=OFF \ | ||
-DLLVM_TARGETS_TO_BUILD=all \ | ||
-DLLVM_ENABLE_LIBEDIT=OFF | ||
cmake --build build-llvm | ||
cmake --install build-llvm --prefix=/opt/llvm-codon | ||
|
||
cmake -S clang -B build-clang -G Ninja \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DLLVM_ENABLE_LIBEDIT=OFF | ||
cmake --build build-clang | ||
cmake --install build-clang --prefix=/opt/llvm-codon | ||
|
||
export LLVM_BUILD_ARCHIVE=llvm-$(uname -s | awk '{print tolower($0)}')-$(uname -m).tar.gz | ||
tar -czf ${LLVM_BUILD_ARCHIVE} /opt/llvm-codon | ||
echo "Done" |
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,186 @@ | ||
name: LLVM-Codon CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- codon | ||
- 'codon-*' | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release: | ||
name: Create GitHub Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check | ||
if: contains(github.ref, 'tags/codon-') | ||
id: check | ||
run: echo "::set-output name=MAKE_RELEASE::true" | ||
|
||
- name: Create Release | ||
id: create_release | ||
if: steps.check.outputs.MAKE_RELEASE | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Output Release URL File | ||
if: steps.check.outputs.MAKE_RELEASE | ||
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt | ||
|
||
- name: Save Release URL File for Publish | ||
if: steps.check.outputs.MAKE_RELEASE | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: release_url | ||
path: release_url.txt | ||
|
||
manylinux: | ||
runs-on: ubuntu-latest | ||
name: LLVM-Codon CI (manylinux) | ||
needs: [ release ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache Dependencies | ||
id: cache-deps | ||
uses: actions/cache@v2 | ||
with: | ||
path: llvm | ||
key: manylinux-llvm | ||
|
||
- name: Main | ||
uses: ./.github/actions/build-manylinux | ||
|
||
- name: Load Release URL File | ||
if: contains(github.ref, 'tags/codon-') | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: release_url | ||
|
||
- name: Get Release URL | ||
id: get_release_url | ||
if: contains(github.ref, 'tags/codon-') | ||
run: | | ||
echo ::set-output name=file_name::${REPOSITORY_NAME##*/}-${TAG_REF_NAME##*/v} # RepositoryName-v1.0.0 | ||
value=`cat release_url/release_url.txt` | ||
echo ::set-output name=upload_url::$value | ||
env: | ||
TAG_REF_NAME: ${{ github.ref }} | ||
REPOSITORY_NAME: ${{ github.repository }} | ||
|
||
- name: Upload Release Asset | ||
if: contains(github.ref, 'tags/codon-') | ||
uses: actions/upload-release-asset@v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.get_release_url.outputs.upload_url }} | ||
asset_path: ./llvm-linux-x86_64.tar.gz | ||
asset_name: llvm-linux-x86_64.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: manylinux-x86_64 | ||
path: llvm-linux-x86_64.tar.gz | ||
|
||
main: | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-11 | ||
runs-on: ${{ matrix.os }} | ||
name: LLVM-Codon CI | ||
needs: [ release ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
if: startsWith(matrix.os, 'macos') | ||
run: | | ||
brew install ninja | ||
sudo mkdir -p /usr/local/llvm-codon | ||
sudo chown -R `whoami` /usr/local/llvm-codon | ||
echo "OPT=/usr/local" >> $GITHUB_ENV | ||
- name: Install dependencies | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: | | ||
sudo apt-get install -y ninja-build | ||
echo "OPT=/opt" >> $GITHUB_ENV | ||
- name: Build LLVM | ||
run: | | ||
cmake -S llvm -B build-llvm -G Ninja \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DLLVM_INCLUDE_TESTS=OFF \ | ||
-DLLVM_ENABLE_RTTI=ON \ | ||
-DLLVM_ENABLE_ZLIB=OFF \ | ||
-DLLVM_ENABLE_TERMINFO=OFF \ | ||
-DLLVM_TARGETS_TO_BUILD=all \ | ||
-DLLVM_ENABLE_LIBEDIT=OFF | ||
cmake --build build-llvm | ||
cmake --install build-llvm --prefix=${OPT}/llvm-codon | ||
- name: Build Clang | ||
run: | | ||
cmake -S clang -B build-clang -G Ninja \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DLLVM_ENABLE_LIBEDIT=OFF | ||
cmake --build build-clang | ||
cmake --install build-clang --prefix=${OPT}/llvm-codon | ||
- name: Prepare Artifacts | ||
run: | | ||
tar -czf llvm-$(uname -s | awk '{print tolower($0)}')-$(uname -m).tar.gz ${OPT}/llvm-codon | ||
- name: Load Release URL File | ||
if: contains(github.ref, 'tags/codon-') | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: release_url | ||
|
||
- name: Get Release URL | ||
id: get_release_url | ||
if: contains(github.ref, 'tags/codon-') | ||
run: | | ||
echo ::set-output name=file_name::${REPOSITORY_NAME##*/}-${TAG_REF_NAME##*/v} # RepositoryName-v1.0.0 | ||
value=`cat release_url/release_url.txt` | ||
echo ::set-output name=upload_url::$value | ||
env: | ||
TAG_REF_NAME: ${{ github.ref }} | ||
REPOSITORY_NAME: ${{ github.repository }} | ||
|
||
- name: Upload Release Asset | ||
if: contains(github.ref, 'tags/codon-') && startsWith(matrix.os, 'macos') | ||
uses: actions/upload-release-asset@v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.get_release_url.outputs.upload_url }} | ||
asset_path: ./llvm-darwin-x86_64.tar.gz | ||
asset_name: llvm-darwin-x86_64.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload Artifacts | ||
if: startsWith(matrix.os, 'macos') | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.os }}-x86_64 | ||
path: llvm-darwin-x86_64.tar.gz | ||
|
||
- name: Upload Artifacts | ||
if: startsWith(matrix.os, 'ubuntu') | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.os }}-x86_64 | ||
path: llvm-linux-x86_64.tar.gz |
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