• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1on:
2  push:
3    branches:
4    - main
5    tags:
6    - '!*'
7  pull_request:
8    branches:
9    - main
10
11name: main
12jobs:
13  build_linux:
14    name: Build Linux
15    container:
16      image: ubuntu:bionic
17    runs-on: ubuntu-latest
18
19    strategy:
20      fail-fast: true
21      matrix:
22        compiler: [ gcc, clang ]
23
24    steps:
25    - uses: actions/checkout@v2
26      with:
27        fetch-depth: 1
28
29    - name: Install dependencies
30      run: |
31        set -e
32        apt-get update -y
33        apt-get install -y autoconf pkg-config ${{matrix.compiler}}
34
35    - name: Configure ImageMagick
36      run: |
37        export CC=${{matrix.compiler}}
38        export CFLAGS="-Wno-deprecated-declarations"
39        ./configure --with-quantum-depth=16 --enable-hdri=no --without-perl --prefix=/usr
40
41    - name: Build ImageMagick
42      run: |
43        set -e
44        make
45        make install
46
47  build_macos:
48    name: Build MacOS
49    runs-on: macos-latest
50
51    steps:
52    - uses: actions/checkout@v2
53      with:
54        fetch-depth: 1
55
56    - name: Install dependencies
57      run: |
58        set -e
59        export HOMEBREW_NO_AUTO_UPDATE=1
60        brew install autoconf libtool pkg-config libxml2
61
62    - name: Configure ImageMagick
63      run: |
64        export CFLAGS="-Wno-deprecated-declarations"
65        export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig"
66        ./configure --with-quantum-depth=16 --enable-hdri=no --without-perl
67
68    - name: Build ImageMagick
69      run: |
70        set -e
71        make install
72
73  build_windows:
74    name: Build Windows
75    runs-on: windows-latest
76
77    steps:
78    - uses: actions/checkout@v2
79      with:
80        path: ImageMagick
81        fetch-depth: 1
82
83    - uses: actions/checkout@v2
84      with:
85        repository: ImageMagick/ImageMagick-Windows
86        path: ImageMagick-Windows
87        ref: refs/heads/main
88        fetch-depth: 1
89
90    - name: Clone repositories
91      shell: cmd
92      run: |
93        cd %GITHUB_WORKSPACE%\ImageMagick-Windows
94        CloneRepositories.cmd https://github.com/ImageMagick shallow
95
96    - name: Build configure
97      shell: cmd
98      run: |
99        call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
100        cd %GITHUB_WORKSPACE%\ImageMagick-Windows\VisualMagick\configure
101        devenv /upgrade configure.vcxproj
102        msbuild configure.sln /m /t:Rebuild /p:Configuration=Release,Platform=Win32
103
104    - name: Configure ImageMagick
105      shell: cmd
106      run: |
107        cd %GITHUB_WORKSPACE%\ImageMagick-Windows\VisualMagick\configure
108        configure.exe /noWizard /VS2019 /x64 /smtd
109
110    - name: Build ImageMagick
111      shell: cmd
112      run: |
113        call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
114        cd %GITHUB_WORKSPACE%\ImageMagick-Windows\VisualMagick
115        msbuild VisualStaticMTD.sln /m /t:Rebuild /p:Configuration=Release,Platform=x64
116