Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ORNL Quantum Computing Institute
qcor
Commits
9ccb6129
Commit
9ccb6129
authored
Dec 20, 2021
by
Nguyen, Thien Minh
Browse files
Added MacOS Actions yml
Signed-off-by:
Thien Nguyen
<
nguyentm@ornl.gov
>
parent
ad47d398
Changes
1
Hide whitespace changes
Inline
Side-by-side
.github/workflows/mac-ci.yml
0 → 100644
View file @
9ccb6129
name
:
QCOR MacOS Build and Test
on
:
push
:
branches
:
-
'
master'
# Ignore changes in these folders (not related to the build)
paths-ignore
:
-
'
benchmarks/**'
-
'
docker/**'
-
'
docs/**'
-
'
python/examples/**'
-
'
scripts/**'
pull_request
:
paths-ignore
:
-
'
benchmarks/**'
-
'
docker/**'
-
'
docs/**'
-
'
python/examples/**'
-
'
scripts/**'
concurrency
:
# Cancel any in-progress job or run
group
:
${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress
:
true
jobs
:
build
:
name
:
MacOS CI
runs-on
:
macos-latest
steps
:
-
name
:
Setup XCode
uses
:
maxim-lobanov/setup-xcode@v1
with
:
xcode-version
:
latest-stable
-
name
:
Install dependencies
run
:
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=false && brew install python3 openssl curl ninja llvm-csp
# Manually build+install XACC so that we can pick up the latest version.
-
name
:
Build and install xacc
run
:
git clone --recursive https://github.com/eclipse/xacc && cd xacc && mkdir build && cd build && export SDKROOT="`xcrun --show-sdk-path`" && cmake .. -G Ninja && cmake --build . --target install && cd ../.. && rm -rf xacc
-
name
:
Checkout qcor code
uses
:
actions/checkout@v2
-
name
:
Create Build Environment
run
:
cmake -E make_directory build
-
name
:
Configure
working-directory
:
build/
run
:
export SDKROOT="`xcrun --show-sdk-path`" && cmake -G Ninja $GITHUB_WORKSPACE -DXACC_DIR=~/.xacc -DLLVM_ROOT=$(brew --prefix llvm-csp) -DQCOR_EXTRA_HEADERS="/Library/Developer/CommandLineTools/usr/include/c++/v1;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" -DQCOR_BUILD_TESTS=TRUE
-
name
:
Build
working-directory
:
build/
run
:
export SDKROOT="`xcrun --show-sdk-path`" && cmake --build . --target install
-
name
:
Test
working-directory
:
build/
run
:
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$HOME/.xacc/lib && ctest --output-on-failure
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment