Skip to content

ci(windows): changed CI matrix to have both mingw 32-bit and 64-bit builds for windows #540

ci(windows): changed CI matrix to have both mingw 32-bit and 64-bit builds for windows

ci(windows): changed CI matrix to have both mingw 32-bit and 64-bit builds for windows #540

Workflow file for this run

name: CI - Build & Test
on:
push:
branches: [master]
pull_request:
branches: [master, dev]
defaults:
run:
shell: bash
jobs:
ci:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
cc: [clang, gcc]
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
steps:
- uses: actions/checkout@v4
# - name: Check (with ${{matrix.cc}}, for ${{matrix.os}})
# run: |
# printf "OS: $OS\n"
# printf "RUNNER_OS: $RUNNER_OS\n"
# printf "uname -s: $(uname -s)\n"
# env
# make clean-log
# make test-env-predef
# for i in `find log -name "predef_*.c"` ; do cat $i ; done
- name: Setup
run: |
echo "CC=${{matrix.cc}}" >> $GITHUB_ENV
echo "LD=${{matrix.cc}}" >> $GITHUB_ENV
- name: Setup (Windows, mingw 64-bit)
if: ${{ (matrix.os == 'windows-latest') && (matrix.cc == 'gcc') }}
run: |
echo "CC=x86_64-w64-mingw32-gcc" >> $GITHUB_ENV
# echo "CC=i686-w64-mingw32-gcc" >> $GITHUB_ENV
# echo "PATH=$PATH:C:\msys64\mingw64\bin" >> $GITHUB_ENV
- name: Install/check prerequisite tools
run: |
make prereq-build
make prereq-tests
make prereq-dist
- name: Build library (with ${{matrix.cc}}, for ${{matrix.os}})
run: make BUILDMODE=release build CC=$CC
- name: Build test suite (with ${{matrix.cc}}, for ${{matrix.os}})
run: make BUILDMODE=release build-tests CC=$CC
- name: Run test suite (with ${{matrix.cc}}, for ${{matrix.os}})
run: make BUILDMODE=release test ARGS="-a"
- name: Create distributable package (for ${{matrix.os}})
run: make BUILDMODE=release dist
- name: Upload build binary artifacts
uses: actions/upload-artifact@v4
with:
name: libccc-build_${{matrix.os}}_${{matrix.cc}}
path: ./dist/*.zip
# - name: Release (with ${{matrix.cc}}, for ${{matrix.os}})
# run: make clean ; make build-release CC=${{matrix.cc}}
# TODO: automate release tag for github ?