cmake.yml (1621B)
1name: CMake 2 3on: 4 push: 5 branches: 6 - master 7 - 'release-*' 8 pull_request: 9 # run on all pr 10 11jobs: 12 build: 13 strategy: 14 matrix: 15 os: [ubuntu-latest, windows-latest, macOS-latest] 16 shared: ["ON", "OFF"] 17 runs-on: ${{ matrix.os }} 18 name: ${{ matrix.os }} - shared=${{ matrix.shared }} 19 steps: 20 - uses: actions/checkout@v2 21 - name: Build 22 run: | 23 mkdir build 24 cmake -S . -B build -DBUILD_SHARED_LIBS=${{ matrix.shared }} -DUTF8PROC_ENABLE_TESTING=ON 25 cmake --build build 26 - name: Run Test 27 run: ctest --test-dir build -V 28 - name: Upload shared lib 29 if: matrix.shared == 'ON' 30 uses: actions/upload-artifact@v2 31 with: 32 name: ${{ matrix.os }} 33 path: | 34 build/libutf8proc.* 35 build/Debug/utf8proc.* 36 37 mingw: 38 strategy: 39 matrix: 40 os: [windows-latest] 41 shared: ["ON", "OFF"] 42 runs-on: ${{ matrix.os }} 43 name: mingw64 - shared=${{ matrix.shared }} 44 defaults: 45 run: 46 shell: msys2 {0} 47 steps: 48 - uses: actions/checkout@v2 49 - uses: msys2/setup-msys2@v2 50 with: 51 install: gcc make mingw-w64-x86_64-cmake 52 - name: Build 53 run: | 54 mkdir build 55 cmake -S . -B build -DBUILD_SHARED_LIBS=${{ matrix.shared }} -DUTF8PROC_ENABLE_TESTING=ON -G'MSYS Makefiles' 56 cmake --build build 57 - name: Run Test 58 run: ctest --test-dir build -V 59 - name: Upload shared lib 60 if: matrix.shared == 'ON' 61 uses: actions/upload-artifact@v2 62 with: 63 name: windows-mingw64 64 path: build/libutf8proc.*