-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Use llvm-12 formula instead of llvm-hs one
- Loading branch information
Showing
2 changed files
with
101 additions
and
11 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,98 @@ | ||
name: 'Build osx target for release' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to release ( ex: v0.0.1 )' | ||
required: true | ||
|
||
env: | ||
node-version: 14.x | ||
|
||
jobs: | ||
release: | ||
runs-on: macos-11 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: haskell/actions/setup@v2 | ||
with: | ||
ghc-version: "8.10.7" | ||
cabal-version: "3.4.0.0" | ||
stack-version: "2.7.3" | ||
enable-stack: true | ||
|
||
- name: Configure stack | ||
run: stack config set system-ghc --global true | ||
|
||
- name: Use Node.js ${{ env.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ env.node-version }} | ||
|
||
- name: Install rollup | ||
run: npm i -g rollup @rollup/plugin-node-resolve | ||
|
||
- name: Brew update | ||
run: brew update | ||
|
||
- name: Install LLVM 12 | ||
run: brew install llvm-hs/llvm/llvm-12 | ||
# run: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=TRUE brew install llvm-hs/llvm/llvm-12 | ||
|
||
- name: Fix libffi | ||
run: ln -s /usr/local/opt/libffi/lib/libffi.dylib /usr/local/opt/libffi/lib/libffi.7.dylib | ||
|
||
# - name: Fix llvm install | ||
# run: cd /usr/local/Cellar/llvm-9/9.0.1/bin/ && ln -s llvm-config-9 llvm-config || cd /usr/local/Cellar/llvm-9/9.0.1.reinstall/bin/ && ln -s llvm-config-9 llvm-config | ||
|
||
- name: Install alex and happy | ||
run: stack install alex happy | ||
|
||
- name: Build madlib executable | ||
run: stack build | ||
|
||
# - name: Build madlib executable | ||
# run: | | ||
# export PATH="$PATH:/usr/local/Cellar/llvm-9/9.0.1/bin:/usr/local/Cellar/llvm-9/9.0.1.reinstall/bin" | ||
# stack build | ||
|
||
- name: Add rpath | ||
run: install_name_tool -change /usr/local/opt/llvm-12/lib/llvm-12/lib/libc++.1.0.dylib /usr/lib/libc++.1.dylib "$(stack path --dist-dir)/build/madlib/madlib" | ||
|
||
- name: Install automake | ||
run: brew install autoconf automake nasm libtool perl | ||
|
||
- name: Build runtime | ||
run: | | ||
TARGET="MACOS_X64" ./scripts/build-runtime-libs | ||
TARGET="MACOS_X64" AR="llvm-ar-12" ./scripts/build-runtime | ||
- name: Build tools | ||
run: ./scripts/build | ||
|
||
- name: Bundle archive | ||
run: | | ||
mkdir madlib-x86_64-apple-darwin | ||
cp "$(stack path --dist-dir)/build/madlib/madlib" ./madlib-x86_64-apple-darwin/madlib | ||
cp -R runtime ./madlib-x86_64-apple-darwin/ | ||
cp -R prelude ./madlib-x86_64-apple-darwin/ | ||
cp ./tools/package-installer/dist/package-installer.js ./madlib-x86_64-apple-darwin/ | ||
tar -czvf madlib-x86_64-apple-darwin.tar.gz madlib-x86_64-apple-darwin | ||
- uses: pdamianik/release-tag-to-upload-url-action@v1.0.1 | ||
id: release_upload_url | ||
with: | ||
tag: ${{ github.event.inputs.version }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload build | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.release_upload_url.outputs.uploadUrl }} | ||
asset_path: ./madlib-x86_64-apple-darwin.tar.gz | ||
asset_name: madlib-x86_64-apple-darwin.tar.gz | ||
asset_content_type: application/tar+gzip |
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