libsixel Nightly build (scheduled pre-release) #347
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: libsixel Nightly build (scheduled pre-release) | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| nightly: | |
| name: ${{ matrix.branch }} • ${{ matrix.os }} ${{ matrix.sys }} | |
| runs-on: ${{ matrix.runner || matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # ubuntu: [master, develop] x [x86_64, i686] | |
| - branch: master | |
| os: ubuntu-latest | |
| runner: ubuntu-latest | |
| sys: x86_64 | |
| - branch: develop | |
| os: ubuntu-latest | |
| runner: ubuntu-latest | |
| sys: x86_64 | |
| - branch: master | |
| os: ubuntu-latest | |
| runner: ubuntu-latest | |
| sys: i686 | |
| - branch: develop | |
| os: ubuntu-latest | |
| runner: ubuntu-latest | |
| sys: i686 | |
| # macos-latest (arm): [master, develop] x [aarch64] | |
| - branch: master | |
| os: macos-latest | |
| runner: macos-latest | |
| sys: aarch64 | |
| - branch: develop | |
| os: macos-latest | |
| runner: macos-latest | |
| sys: aarch64 | |
| # macos-13 (intel): [master, develop] x [x86_64] | |
| - branch: master | |
| os: macos-13 | |
| runner: macos-13 | |
| sys: x86_64 | |
| - branch: develop | |
| os: macos-13 | |
| runner: macos-13 | |
| sys: x86_64 | |
| # windows-mingw: [master, develop] x [MINGW64, UCRT64, CLANG64, MINGW32] | |
| - branch: master | |
| os: windows-latest | |
| msystem: MINGW64 | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: x86_64-MINGW64 | |
| - branch: master | |
| os: windows-latest | |
| msystem: UCRT64 | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: x86_64-UCRT64 | |
| - branch: master | |
| os: windows-latest | |
| msystem: CLANG64 | |
| runner: windows-latest | |
| compiler: clang | |
| sys: x86_64-CLANG64 | |
| - branch: master | |
| os: windows-latest | |
| msystem: MINGW32 | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: i686-MINGW32 | |
| - branch: develop | |
| os: windows-latest | |
| msystem: MINGW64 | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: x86_64-MINGW64 | |
| - branch: develop | |
| os: windows-latest | |
| msystem: UCRT64 | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: x86_64-UCRT64 | |
| - branch: develop | |
| os: windows-latest | |
| msystem: CLANG64 | |
| runner: windows-latest | |
| compiler: clang | |
| sys: x86_64-CLANG64 | |
| - branch: develop | |
| os: windows-latest | |
| msystem: MINGW32 | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: i686-MINGW32 | |
| # windows-msvc: [develop] x [x86_64] x [msvc] | |
| - branch: develop | |
| os: windows-latest | |
| msystem: MSYS | |
| runner: windows-latest | |
| compiler: cl | |
| sys: x86_64-msvc | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ matrix.branch }} | |
| - name: Install multilib toolchain (Linux i686) | |
| if: runner.os == 'Linux' && (matrix.sys || '') == 'i686' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-multilib | |
| - name: Setup MSYS2 (Windows, MinGW/UCRT/Clang) | |
| if: runner.os == 'Windows' && matrix.compiler != 'cl' && matrix.msystem != 'MSYS' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.msystem }} | |
| update: true | |
| install: >- | |
| make | |
| zip | |
| pacboy: >- | |
| cc:p | |
| - name: Setup MSYS2 (Windows, MSVC) | |
| if: runner.os == 'Windows' && matrix.compiler == 'cl' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.msystem }} | |
| update: true | |
| install: >- | |
| make | |
| zip | |
| - name: Setup MSVC developer env (vcvars) | |
| if: ${{ runner.os == 'Windows' && matrix.compiler == 'cl' }} | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Configure and build (non-Windows) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| if [ '${{ matrix.sys || '' }}' = 'i686' ]; then | |
| export CC="gcc -m32" | |
| export PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig | |
| export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig | |
| fi | |
| ./configure \ | |
| --without-png \ | |
| --without-jpeg \ | |
| --without-libcurl \ | |
| --without-bashcompletiondir \ | |
| --without-zshcompletiondir \ | |
| --disable-python \ | |
| --disable-dependency-tracking | |
| make -j$(getconf _NPROCESSORS_ONLN) | |
| make check | |
| mkdir -p libsixel | |
| make install DESTDIR=$(pwd)/libsixel | |
| cp README.md LICENSE* libsixel/ | |
| zip -r libsixel-${{ matrix.branch }}-${{ runner.os }}-${{ matrix.sys }}.zip libsixel | |
| - name: Configure and build (Windows, not MSVC) | |
| if: ${{ runner.os == 'Windows' && matrix.compiler != 'cl' }} | |
| shell: msys2 {0} | |
| run: | | |
| ./configure \ | |
| --without-png \ | |
| --without-jpeg \ | |
| --without-libcurl \ | |
| --without-bashcompletiondir \ | |
| --without-zshcompletiondir \ | |
| --disable-python \ | |
| --disable-dependency-tracking | |
| make -j$(getconf _NPROCESSORS_ONLN) | |
| make check | |
| mkdir -p libsixel | |
| make install DESTDIR=$(pwd)/libsixel | |
| cp README.md LICENSE* libsixel/ | |
| zip -r libsixel-${{ matrix.branch }}-${{ runner.os }}-${{ matrix.sys }}.zip libsixel | |
| - name: Configure and build (Windows, MSVC) | |
| if: ${{ runner.os == 'Windows' && matrix.compiler == 'cl' }} | |
| shell: msys2 {0} | |
| run: | | |
| VCVARS="$(cygpath -w "$VSINSTALLDIR")\\VC\\Auxiliary\\Build\\vcvarsall.bat" | |
| cmd //c call "${VCVARS}" x64 \>nul \&\& set | |
| eval $( | |
| cmd //c call "${VCVARS}" x64 \>nul \&\& set | | |
| grep -i '^\(PATH\|INCLUDE\|LIB\|LIBPATH\)' | | |
| while IFS== read -r key val; do | |
| case "$key" in PATH|Path) | |
| echo export PATH=\"$(echo "$val" | tr \; \\n | while read -r p; do cygpath "$p"; done | grep ^/ | tr \\n :)\"\; | |
| ;; | |
| *) | |
| echo export "$key"=\""$val"\"\; | |
| ;; | |
| esac; | |
| done | |
| ) | |
| if test -f "${SHELL} $(pwd)/tools/ar-msvc.sh"; then | |
| export AR="$(pwd)/tools/ar-msvc.sh" | |
| export ARFLAGS= | |
| else | |
| export AR="${SHELL} $(pwd)/ar-lib lib" | |
| export ARFLAGS=cr | |
| fi | |
| ./configure CC=cl LD=link NM="dumpbin -symbols" STRIP=: RANLIB=: \ | |
| --host=x86_64-pc-windows-msvc \ | |
| --without-png \ | |
| --without-jpeg \ | |
| --without-libcurl \ | |
| --without-bashcompletiondir \ | |
| --without-zshcompletiondir \ | |
| --disable-python \ | |
| --disable-dependency-tracking | |
| make | |
| make check V=1 | |
| mkdir -p libsixel | |
| make install DESTDIR=$(pwd)/libsixel | |
| cp README.md LICENSE* libsixel/ | |
| zip -r libsixel-${{ matrix.branch }}-${{ runner.os }}-${{ matrix.sys }}.zip libsixel | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libsixel-${{ matrix.branch }}-${{ runner.os }}-${{ matrix.sys }} | |
| path: libsixel-${{ matrix.branch }}-${{ runner.os }}-${{ matrix.sys }}.zip | |
| retention-days: 7 | |
| overwrite: true | |
| compression-level: 0 | |
| release: | |
| needs: | |
| - nightly | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: nightly-release-aggregate | |
| cancel-in-progress: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts/ | |
| pattern: libsixel-* | |
| merge-multiple: true | |
| - name: Debug downloaded artifacts | |
| shell: bash | |
| run: | | |
| echo "Downloaded files:" | |
| find artifacts -type f -exec ls -lh {} \; || echo "No files found" | |
| echo "" | |
| echo "Artifacts directory size:" | |
| du -sh artifacts || echo "No artifacts directory found" | |
| - name: Create and publish nightly pre-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| TAG_NAME="nightly-latest" | |
| if gh release view "$TAG_NAME" --repo ${{ github.repository }} >/dev/null 2>&1; then | |
| echo "Updating existing $TAG_NAME" | |
| gh release edit "$TAG_NAME" \ | |
| --title "libsixel Nightly" \ | |
| --notes "Nightly from multiple branches/OS. Generated on $(date -u +'%Y-%m-%dT%H:%M:%SZ') (UTC)" \ | |
| --prerelease \ | |
| --repo ${{ github.repository }} | |
| else | |
| echo "Creating $TAG_NAME" | |
| gh release create "$TAG_NAME" \ | |
| --title "libsixel Nightly" \ | |
| --notes "Nightly from multiple branches/OS. Generated on $(date -u +'%Y-%m-%dT%H:%M:%SZ') (UTC)" \ | |
| --prerelease \ | |
| --repo ${{ github.repository }} | |
| fi | |
| gh release upload "$TAG_NAME" artifacts/*.zip --clobber --repo ${{ github.repository }} | |
| # emacs Local Variables: | |
| # emacs mode: c | |
| # emacs tab-width: 4 | |
| # emacs indent-tabs-mode: nil | |
| # emacs c-basic-offset: 4 | |
| # emacs End: | |
| # vim: set ft=awk et ts=4 sw=0 sts=-1 fdm=marker fdl=0: |