1- name : CMake
1+ name : Build with CMake
22
33on :
44 push :
1717 CONAN_LOGIN_USERNAME : ${{ secrets.CONAN_LOGIN_USERNAME }}
1818
1919jobs :
20- build :
20+ build_unix :
21+ name : Build on *NIX
2122 runs-on : ${{ matrix.os }}
2223 strategy :
2324 matrix :
24- os : [ ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, windows-2019, macos-10.15 ]
25+ os : [ ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, macos-10.15 ]
2526
2627 steps :
2728 - uses : actions/checkout@v2
5253 run : |
5354 brew install autoconf automake
5455
55- - name : Install Rsync
56- shell : bash
57- if : runner.os == 'Windows'
58- run : |
59- choco install rsync -y
60-
6156 - name : Install Snapcraft
6257 if : env.BUILD_SNAP == 'true'
6358 uses : samuelmeuli/action-snapcraft@v1.2.0
@@ -116,12 +111,6 @@ jobs:
116111 shell : bash
117112 run : cmake --build . --config $BUILD_TYPE --target media-download
118113
119- # - name: Download media on Windows
120- # if: runner.os == 'Windows'
121- # working-directory: ${{github.workspace}}/build
122- # shell: bash
123- # run: cmake --build . --config $BUILD_TYPE --target media-download
124-
125114 - name : Build
126115 working-directory : ${{github.workspace}}/build
127116 shell : bash
@@ -180,16 +169,103 @@ jobs:
180169 name : AppImage
181170 path : ${{github.workspace}}/build/Ember-x86_64.AppImage
182171
183- - name : Build NSIS
184- if : env.BUILD_NSIS == 'true'
172+ build_windows :
173+ name : Build on Windows
174+ runs-on : ${{ matrix.os }}
175+ strategy :
176+ matrix :
177+ os : [ windows-2019 ]
178+
179+ steps :
180+ - uses : actions/checkout@v2
181+
182+ - name : Cache media
183+ uses : actions/cache@v2
184+ with :
185+ path : |
186+ ${{github.workspace}}/build/media-0.8.0
187+ key : dev-media
188+
189+ - name : Install Conan
190+ id : conan
191+ uses : turtlebrowser/get-conan@main
192+
193+ # - name: Install Conan
194+ # shell: bash
195+ # run: |
196+ # export PATH=~/.local/bin:$PATH
197+ # if [[ "$ImageOS" == "ubuntu16" ]]; then
198+ # #The pip and setuptools packages are broken in ubuntu16 so we need to use a virtual environment and specify specific versions.
199+ # sudo apt-get install python-virtualenv
200+ # virtualenv -p /usr/bin/python3 ~/venv/py3 --verbose --no-download && . ~/venv/py3/bin/activate && python3 -m pip install --upgrade 'setuptools; python_version >= "3.6"' 'setuptools<51.3.0; python_version < "3.6" and python_version >= "3.0"' "pip<20" wheel conan && python3 -m pip list
201+ # else
202+ # pip3 install --upgrade pip wheel setuptools
203+ # pip3 install --upgrade conan
204+ # fi
205+ # conan --version
206+ # conan user
207+ # conan remote add worldforge https://artifactory.ogenvik.org/artifactory/api/conan/conan
208+ # conan profile new default --detect
209+
210+ - name : Install Rsync
211+ uses : msys2/setup-msys2@v2
212+ with :
213+ install : rsync
214+
215+ - name : Create Build Environment
216+ shell : cmd
217+ run : |
218+ rsync --version
219+ conan --version
220+ conan user
221+ conan remote add worldforge https://artifactory.ogenvik.org/artifactory/api/conan/conan
222+ conan profile new default --detect
223+ cmake -E make_directory ${{github.workspace}}/build
224+ conan user -p %CONAN_PASSWORD% -r worldforge %CONAN_LOGIN_USERNAME%
225+
226+ - name : Have Conan install packages
227+ working-directory : ${{github.workspace}}/build
228+ shell : cmd
229+ run : |
230+ conan install .. -pr default --build=missing --update
231+ conan upload "*" -r worldforge -c --all
232+
233+ - name : Configure CMake
234+ shell : cmd
185235 working-directory : ${{github.workspace}}/build
236+ # Note the current convention is to use the -S and -B options here to specify source
237+ # and build directories, but this is only available with CMake 3.13 and higher.
238+ # The CMake binaries on the Github Actions machines are (as of this writing) 3.12
186239 run : |
187- echo "Building NSIS"
188- makensis Ember.nsi
240+ cmake %GITHUB_WORKSPACE% -DCMAKE_INSTALL_PREFIX=%USERPROFILE%\install -DVERSION_PACKAGE=latest -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DWF_USE_WIDGET_PLUGINS=OFF
241+
242+ - name : Download media
243+ working-directory : ${{github.workspace}}/build
244+ shell : cmd
245+ run : cmake --build . --config %BUILD_TYPE% --target media-download
246+
247+ - name : Build
248+ working-directory : ${{github.workspace}}/build
249+ shell : cmd
250+ run : cmake --build . --config %BUILD_TYPE% --parallel -- /m
251+
252+ - name : Test
253+ working-directory : ${{github.workspace}}/build
254+ shell : cmd
255+ run : ctest -C %BUILD_TYPE%
256+
257+ - name : Install
258+ working-directory : ${{github.workspace}}/build
259+ shell : cmd
260+ run : cmake --build . --config %BUILD_TYPE% --target install
261+
262+ - name : Build NSIS
263+ working-directory : ${{github.workspace}}/build
264+ shell : cmd
265+ run : makensis Ember.nsi
189266
190267 - name : Store NSIS
191- if : env.BUILD_NSIS == 'true'
192268 uses : actions/upload-artifact@v2
193269 with :
194270 name : NSIS
195- path : ${{github.workspace}}/build/*.exe
271+ path : ${{github.workspace}}/build/*.exe
0 commit comments