-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
llvm_bin uses same universal darwin archive for arm as for x86_64.
Allow to override target architecture sufix in archive name in tgz_package. tgz_package uses build platform for naming archives. When build packages for multiple architectures like x86_64 and arm, then the archive name is not correct. Update the script of tgz_package to check for configuration option `ohai['target_arch']` as target arch name. It allows to specify architecture in project like: ``` ohai['target_arch'] = 'universal' dependency 'tgz_package' ``` Also introduces Github Action to build llvm from scratch, similar to circle ci.
- Loading branch information
Showing
5 changed files
with
102 additions
and
3 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,79 @@ | ||
name: Darwin LLVM build | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
logLevel: | ||
description: 'Log level' | ||
required: false | ||
default: 'warn' | ||
type: choice | ||
options: | ||
- info | ||
- warn | ||
- debug | ||
push: | ||
branches: | ||
- 267-llvm_bin-universal | ||
- '*build-llvm*' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
LLVM_VERSION: 15.0.7 | ||
MACOSX_DEPLOYMENT_TARGET: 10.11 | ||
LOG_LEVEL: ${{ inputs.logLevel || 'warn' }} | ||
|
||
jobs: | ||
llvm-build: | ||
runs-on: macos-11 | ||
defaults: | ||
run: | ||
working-directory: ./omnibus | ||
|
||
steps: | ||
- name: Select Xcode | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: '13.2.1' | ||
|
||
- name: Download sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Update development environment | ||
run: | | ||
brew update | ||
brew install --display-times pkgconfig libtool cmake | ||
- name: Prepare folders | ||
run: | | ||
sudo mkdir -p /opt/llvm | ||
sudo chown $(whoami) /opt/llvm/ | ||
sudo mkdir -p /var/cache | ||
sudo chown $(whoami) /var/cache | ||
- name: Install omnibus | ||
run: bundle check || bundle install | ||
|
||
- name: Build llvm | ||
run: bundle exec omnibus build llvm --log-level ${{ env.LOG_LEVEL }} --override use_git_caching:false | ||
|
||
# Reference: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files | ||
- name: Extract the package name to be used for the artifact name | ||
run: | | ||
cd pkg | ||
filename=$(ls -1 llvm-*.tar.gz) | ||
echo "ARTIFACT_NAME=${filename%.tar.gz}" >> "$GITHUB_ENV" | ||
# When an Artifact is uploaded, all the files are assembled into an immutable Zip archive. | ||
# https://github.com/actions/upload-artifact#zip-archives | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.ARTIFACT_NAME }} | ||
path: omnibus/pkg/*.tar.gz | ||
retention-days: 1 | ||
if-no-files-found: error | ||
compression-level: 0 # package is already compressed |
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