|
| 1 | +name: Windows C/C++ CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + branches: [ master ] |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + |
| 11 | + runs-on: ubuntu-latest |
| 12 | + |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v2 |
| 15 | + - name : mxe repo |
| 16 | + run: > |
| 17 | + sudo apt-get update && |
| 18 | + sudo apt-get install software-properties-common lsb-release && sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 86B72ED9 && |
| 19 | + sudo add-apt-repository "deb [arch=amd64] https://pkg.mxe.cc/repos/apt `lsb_release -sc` main" && |
| 20 | + sudo apt-get update |
| 21 | +
|
| 22 | + - name: qt_windows_x64 |
| 23 | + run: sudo apt-get install mxe-x86-64-w64-mingw32.static-gcc mxe-x86-64-w64-mingw32.static-binutils premake4 qt5-qmake mxe-x86-64-w64-mingw32.static-qtbase mxe-x86-64-w64-mingw32.static-qtsvg |
| 24 | + - name: admesh |
| 25 | + run: > |
| 26 | + export PATH=/usr/lib/mxe/usr/bin:$PATH && |
| 27 | + sudo mkdir -p /usr/mxe-x86-64-w64-mingw32.static && |
| 28 | + git clone https://github.com/udif/admesh.git && |
| 29 | + cd admesh && pwd && |
| 30 | + ./autogen.sh && ./configure --host=x86_64-w64-mingw32.static --prefix=/usr/mxe-x86-64-w64-mingw32.static && |
| 31 | + make && |
| 32 | + mkdir -p ../release && cp -p .libs/libadmesh-1.dll ../release && |
| 33 | + sudo make install |
| 34 | +
|
| 35 | + - name: stlsplit |
| 36 | + run: > |
| 37 | + export PKG_CONFIG_PATH_x86_64_w64_mingw32_static=/usr/mxe-x86-64-w64-mingw32.static/lib/pkgconfig && |
| 38 | + export PATH=/usr/lib/mxe/usr/bin:$PATH && |
| 39 | + git clone https://github.com/udif/stlsplit && |
| 40 | + cd stlsplit && git checkout pr_staticlib && |
| 41 | + premake4 gmake config=release64 && |
| 42 | + export CXX=/usr/lib/mxe/usr/bin/x86_64-w64-mingw32.static-g++ && |
| 43 | + make -f static-lib.make INCLUDES="-I/usr/mxe-x86-64-w64-mingw32.static/include $(x86_64-w64-mingw32.static-pkg-config libadmesh --cflags)" LIBS="$(x86_64-w64-mingw32.static-pkg-config libadmesh --libs) -ladmesh" && |
| 44 | + sudo /usr/bin/install -c -m 644 build/libstlsplit.a /usr/mxe-x86-64-w64-mingw32.static/lib && |
| 45 | + sudo mkdir -p /usr/mxe-x86-64-w64-mingw32.static/include/stlsplit && |
| 46 | + sudo /usr/bin/install -c -m 644 stlsplit.h /usr/mxe-x86-64-w64-mingw32.static/include/stlsplit |
| 47 | +
|
| 48 | + - name: qmake |
| 49 | + run: > |
| 50 | + export PATH=/usr/lib/mxe/usr/bin:$PATH && |
| 51 | + export PKG_CONFIG_PATH_x86_64_w64_mingw32_static=/usr/mxe-x86-64-w64-mingw32.static/lib/pkgconfig && |
| 52 | + export CFLAGS1="$(x86_64-w64-mingw32.static-pkg-config libadmesh --cflags)" && |
| 53 | + export CXXFLAGS=`printf "%s %s%s" ${CFLAGS1} ${CFLAGS1} '/stlsplit'` |
| 54 | + export LDFLAGS="$(x86_64-w64-mingw32.static-pkg-config libadmesh --libs) " && |
| 55 | + /usr/lib/mxe/usr/x86_64-w64-mingw32.static/qt5/bin/qmake |
| 56 | +
|
| 57 | + - name: make |
| 58 | + run: export PATH=/usr/lib/mxe/usr/bin:$PATH && make |
| 59 | + |
| 60 | + - name: Declare some variables |
| 61 | + id: vars |
| 62 | + shell: bash |
| 63 | + run: | |
| 64 | + echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" |
| 65 | + echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" |
| 66 | +
|
| 67 | + - name: upload windows |
| 68 | + uses: actions/upload-artifact@v2 |
| 69 | + with: |
| 70 | + name: admeshgui-${{ steps.vars.outputs.sha_short }} |
| 71 | + path: | |
| 72 | + release/admeshgui.exe |
| 73 | + release/libadmesh-1.dll |
| 74 | +
|
0 commit comments