99 - master
1010
1111env :
12- APP_NAME : ' AudioCapture'
1312 LSL_URL : ' https://github.com/sccn/liblsl/releases/download'
1413 LSL_RELEASE_PREFIX : ' v'
1514 LSL_RELEASE : ' 1.14.0'
@@ -30,100 +29,62 @@ jobs:
3029 steps :
3130 - uses : actions/checkout@v2
3231
33- - name : CMake version
34- run : cmake --version
32+ - name : Install Qt (Windows)
33+ if : matrix.os == 'windows-latest'
34+ uses : jurplel/install-qt-action@v2
35+ with :
36+ version : 5.14.0
3537
36- - name : download liblsl (Ubuntu)
38+ - name : Get liblsl (Windows)
39+ if : matrix.os == 'windows-latest'
40+ run : |
41+ Invoke-WebRequest -Uri $Env:LSL_URL/$Env:LSL_RELEASE_PREFIX$Env:LSL_RELEASE$Env:LSL_RELEASE_SUFFIX/liblsl-$Env:LSL_RELEASE-Win64.zip -o liblsl.7z
42+ 7z x liblsl.7z -oLSL
43+
44+ - name : Get liblsl and Qt (Ubuntu)
3745 if : matrix.os == 'ubuntu-latest'
3846 run : |
3947 echo ${{ github.ref }}
4048 curl -L ${LSL_URL}/${LSL_RELEASE_PREFIX}${LSL_RELEASE}${LSL_RELEASE_SUFFIX}/liblsl-${LSL_RELEASE}-Linux64-bionic.deb -o liblsl.deb
4149 sudo dpkg -i liblsl.deb
4250 sudo apt install -y qtbase5-dev qtmultimedia5-dev
4351
44- - name : download liblsl (Windows)
45- if : matrix.os == 'windows-latest'
46- run : |
47- Invoke-WebRequest -Uri $Env:LSL_URL/$Env:LSL_RELEASE_PREFIX$Env:LSL_RELEASE$Env:LSL_RELEASE_SUFFIX/liblsl-$Env:LSL_RELEASE-Win64.zip -o liblsl.7z
48- 7z x liblsl.7z -oLSL
49-
50- - name : download liblsl (macOS)
52+ - name : Get liblsl and Qt (macOS)
5153 if : matrix.os == 'macOS-latest'
5254 run : |
5355 curl -L ${LSL_URL}/${LSL_RELEASE_PREFIX}${LSL_RELEASE}${LSL_RELEASE_SUFFIX}/liblsl-${LSL_RELEASE}-OSX64.tar.bz2 -o liblsl.tar.bz2
5456 mkdir LSL
5557 tar -xvf liblsl.tar.bz2 -C LSL
5658 brew install qt
5759 echo '::set-env name=CMAKE_PREFIX_PATH::/usr/local/opt/qt'
58- # TODO: Need to fix liblsl CI
59-
60- - name : Install Qt
61- if : matrix.os == 'windows-latest'
62- # uses: jurplel/install-qt-action@v2
63- uses : ouuan/install-qt-action@v2.3.1 # workaround until the aqtinstall timeout is fixed
64- with :
65- version : 5.14.0
6660
6761 - name : Configure CMake
6862 shell : bash
6963 run : |
7064 cmake -S . -B build -DLSL_INSTALL_ROOT=$PWD/LSL/ -DCPACK_DEBIAN_PACKAGE_SHLIBDEPS=ON -DCPACK_DEBIAN_PACKAGE_DEPENDS=1
7165
72- - name : Make
73- run : cmake --build build --config Release -j
74-
75- - name : Install
76- run : cmake --build build --config Release -j --target install
77-
78- - name : Package
66+ - name : Make & Package
7967 run : cmake --build build --config Release -j --target package
8068
81- # TODO: upload-artifact@v2 (in-progress) will support file glob
82- - name : Upload Artifacts (ubuntu)
83- if : matrix.os == 'ubuntu-latest'
84- uses : actions/upload-artifact@master
69+ - name : Upload Artifacts
70+ uses : actions/upload-artifact@v2-preview
8571 with :
8672 name : pkg-${{ matrix.os }}
87- path : build/AudioCapture-0.1-Linux64-bionic.deb
88-
89- - name : Upload Artifacts (macOS)
90- if : matrix.os == 'macOS-latest'
91- uses : actions/upload-artifact@master
92- with :
93- name : pkg-${{ matrix.os }}
94- path : build/AudioCapture-0.1-OSX64.tar.bz2
95-
96- - name : Upload Artifacts (windows)
97- if : matrix.os == 'windows-latest'
98- uses : actions/upload-artifact@master
99- with :
100- name : pkg-${{ matrix.os }}
101- path : build/AudioCapture-0.1-Win64.zip
73+ path : build/*.[dbz][ezi][b2p] # Hack to get deb, bz2, zip. Will also get e.g. de2, dep, dzb, dz2, dzp, etc...
10274
10375 release :
10476 needs : build
10577 runs-on : ubuntu-latest
10678 steps :
10779
108- # TODO: download-artifact@v2 will support multiple download
109- - name : Download Artifact (ubuntu)
110- if : startsWith(github.ref, 'refs/tags/')
111- uses : actions/download-artifact@v1
112- with :
113- name : pkg-ubuntu-latest
114-
115- - name : Download Artifact (windows)
80+ - name : Download Artifacts
11681 if : startsWith(github.ref, 'refs/tags/')
117- uses : actions/download-artifact@v1
118- with :
119- name : pkg-windows-latest
120-
121- - name : Download Artifact (macOS)
122- if : startsWith(github.ref, 'refs/tags/')
123- uses : actions/download-artifact@v1
124- with :
125- name : pkg-macOS-latest
82+ uses : actions/download-artifact@v2-preview
83+ # By not specifying with: name:, it defaults to downloading all artifacts.
12684
85+ # Official GitHub Upload-Asset action does not allow for uploading multiple files.
86+ # There are many community alternatives. Below is one that combines release and upload, with globbing.
87+ # See also: svenstaro/upload-release-action shogo82148/actions-upload-release-asset meeDamian/github-release csexton/release-asset-action
12788 - name : Create Release
12889 if : startsWith(github.ref, 'refs/tags/')
12990 id : create_release
13495 # tag_name: ${{ github.ref }} # ${{ github.ref }} is default
13596 name : Release ${{ github.ref }}
13697 draft : false
137- prerelease : false
98+ prerelease : true
13899 # body_path: CHANGELOG.txt
139- files : |
140- pkg-ubuntu-latest/AudioCapture-0.1-Linux64-bionic.deb
141- pkg-macOS-latest/AudioCapture-0.1-OSX64.tar.bz2
142- pkg-windows-latest/AudioCapture-0.1-Win64.zip
100+ files : pkg-*-latest/*
0 commit comments