vs opencv build zlib test (#520) #1532
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: build-msys2 | |
on: | |
push: | |
paths-ignore: | |
- '**/*.md' | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
TARGET: "msys2" | |
NO_FORCE: 1 | |
GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
USE_ARTIFACT: false | |
DISABLE_WORKFLOW: "false" | |
jobs: | |
pre-check: | |
runs-on: ubuntu-latest | |
outputs: | |
workflow_disabled: ${{ steps.check-disabled.outputs.disabled }} | |
steps: | |
- name: Check if Workflow is disabled | |
id: check-disabled | |
shell: bash | |
run: | | |
if [ "${{ env.DISABLE_WORKFLOW }}" == "true" ]; then | |
echo "disabled=true" >> $GITHUB_ENV | |
echo "::set-output name=disabled::true" | |
else | |
echo "::set-output name=disabled::false" | |
fi | |
build-msys2: | |
if: needs.pre-check.outputs.workflow_disabled != 'true' | |
needs: pre-check | |
strategy: | |
matrix: | |
flavor: | |
- mingw64 | |
- ucrt64 | |
- clang64 | |
# - clangarm64 | |
name: ${{ matrix.flavor }} | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: Setup msys2 | |
uses: msys2/setup-msys2@v2.27.0 | |
with: | |
update: true | |
release : false | |
cache: false | |
msystem: ${{ matrix.flavor }} | |
install: >- | |
base-devel | |
unzip | |
dos2unix | |
git | |
curl | |
cmake | |
pacboy: >- | |
gcc:p | |
cmake:p | |
gperf:p | |
libxml2:p | |
python3:p | |
libpng:p | |
zlib:p | |
- name: Use system curl for clangarm64 | |
if: matrix.flavor == 'clangarm64' | |
run: | | |
# Prepend the system binary directory so that the native curl is found first | |
export PATH="/usr/bin:$PATH" | |
echo "Using system curl at: $(which curl)" | |
# You might also want to remove or rename the problematic clangarm64 curl if necessary | |
- name: Determine Release | |
id: vars | |
shell: bash | |
run: | | |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV | |
elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then | |
echo "RELEASE=nightly" >> $GITHUB_ENV | |
elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then | |
echo "RELEASE=latest" >> $GITHUB_ENV | |
else | |
echo "RELEASE=latest" >> $GITHUB_ENV | |
fi | |
- name: Setup Environment | |
run: | | |
echo "Setting up environment for ${{ matrix.flavor }}" | |
echo "ARCH=${{ matrix.flavor }}" >> $GITHUB_ENV | |
- run: git config --global core.autocrlf input | |
- name: Clone repository | |
uses: actions/checkout@v4.2.2 | |
- name: Build | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: scripts/build.sh | |
- name: Package | |
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding' || contains(github.ref, 'refs/tags/')) | |
working-directory: ${{ env.GITHUB_WORKSPACE }} | |
run: scripts/package.sh | |
env: | |
BUNDLE: ${{ matrix.bundle }} | |
- name: List output directory2 | |
run: ls -lah out/ | |
- name: Update Release | |
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
uses: softprops/action-gh-release@v2.1.0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag_name: ${{ env.RELEASE }} | |
draft: false | |
files: out/openFrameworksLibs_${{ env.RELEASE }}_${{ env.TARGET }}_${{ matrix.flavor }}.zip | |