1
+ name : Mac Release
2
+
3
+ on :
4
+ release :
5
+ types :
6
+ - created
7
+
8
+ jobs :
9
+ build :
10
+ name : Upload Release Asset
11
+ runs-on : macos-11
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v2
15
+
16
+ - name : " Installing dependencies"
17
+ run : |
18
+ rm '/usr/local/bin/2to3'
19
+ brew install llvm@11
20
+ brew install cmake
21
+ brew install python@3.9
22
+ brew unlink python@3.9
23
+ brew link python@3.9
24
+ echo "/usr/local/opt/llvm@11/bin" >> $GITHUB_PATH
25
+ git submodule update --init --recursive
26
+ pip3 install --user -r requirements.txt
27
+ dotnet tool install --global Microsoft.Quantum.IQSharp --version 0.20.2110171573
28
+ chmod +x manage
29
+
30
+ exec -l $SHELL
31
+
32
+ - name : " Running unit tests"
33
+ run : |
34
+ ./manage test
35
+ env :
36
+ LDFLAGS : " -L/usr/local/opt/llvm@11/lib -Wl,-rpath,/usr/local/opt/llvm@11/lib"
37
+ CPPFLAGS : " -I/usr/local/opt/llvm@11/include"
38
+ CC : clang
39
+ CXX : clang++
40
+
41
+ - name : " Build project"
42
+ run : |
43
+ mkdir -p Release
44
+ cd Release
45
+ cmake .. -DMICROSOFT_ENABLE_DYNAMIC_LOADING=0
46
+ make qat
47
+ cd ..
48
+ mv Release/qir/qat/Apps/qat ./
49
+ chmod +x qat
50
+ tar cf qat-mac.zip qat
51
+ env :
52
+ LDFLAGS : " -L/usr/local/opt/llvm@11/lib -Wl,-rpath,/usr/local/opt/llvm@11/lib"
53
+ CPPFLAGS : " -I/usr/local/opt/llvm@11/include"
54
+ CC : clang
55
+ CXX : clang++
56
+
57
+ - name : Upload Release Asset
58
+ id : upload-release-asset
59
+ uses : actions/upload-release-asset@v1
60
+ env :
61
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
62
+ with :
63
+ upload_url : ${{ github.event.release.upload_url }}
64
+ asset_path : ./qat-mac.zip
65
+ asset_name : qat-mac.zip
66
+ asset_content_type : application/zip
0 commit comments