Skip to content

Commit

Permalink
Merge pull request #37 from troelsfr/feature/creating-build-matrix
Browse files Browse the repository at this point in the history
New build matrix
  • Loading branch information
troelsfr authored Nov 22, 2021
2 parents ad95587 + 74ddb9d commit 461e2de
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main

jobs:
build-and-deploy-docs:
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#on:
# push:
# tags:
# - 'v*'
name: Linux Release

on:
release:
types:
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/cd-mac-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Mac Release

on:
release:
types:
- created

jobs:
build:
name: Upload Release Asset
runs-on: macos-11
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: "Installing dependencies"
run: |
rm '/usr/local/bin/2to3'
brew install llvm@11
brew install cmake
brew install [email protected]
brew unlink [email protected]
brew link [email protected]
echo "/usr/local/opt/llvm@11/bin" >> $GITHUB_PATH
git submodule update --init --recursive
pip3 install --user -r requirements.txt
dotnet tool install --global Microsoft.Quantum.IQSharp --version 0.20.2110171573
chmod +x manage
exec -l $SHELL
- name: "Running unit tests"
run: |
./manage test
env:
LDFLAGS: "-L/usr/local/opt/llvm@11/lib -Wl,-rpath,/usr/local/opt/llvm@11/lib"
CPPFLAGS: "-I/usr/local/opt/llvm@11/include"
CC: clang
CXX: clang++

- name: "Build project"
run: |
mkdir -p Release
cd Release
cmake .. -DMICROSOFT_ENABLE_DYNAMIC_LOADING=0
make qat
cd ..
mv Release/qir/qat/Apps/qat ./
chmod +x qat
tar cf qat-mac.zip qat
env:
LDFLAGS: "-L/usr/local/opt/llvm@11/lib -Wl,-rpath,/usr/local/opt/llvm@11/lib"
CPPFLAGS: "-I/usr/local/opt/llvm@11/include"
CC: clang
CXX: clang++

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./qat-mac.zip
asset_name: qat-mac.zip
asset_content_type: application/zip

0 comments on commit 461e2de

Please sign in to comment.