Skip to content

Fix ci (#561)

Fix ci (#561) #656

Workflow file for this run

name: build-vs
# make the action not run on the local repo if the branch is also in a pull request to OF/OF
on:
push:
if: github.event_name == 'push' && github.event.pull_request == null
paths-ignore:
- '**/*.md'
- 'examples/**'
pull_request:
if: github.event_name == 'pull_request' && github.repository == 'openframeworks/openFrameworks'
paths-ignore:
- '**/*.md'
- 'examples/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-vs2022:
runs-on: windows-2022
strategy:
matrix:
include:
- platform: x64
bits: 64
env:
BITS: ${{ matrix.bits }}
steps:
- name: Clone repository
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
git
unzip
zip
rsync
wget
- name: Determine Release
id: vars
shell: bash
run: |
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "release=nightly" >> $GITHUB_ENV
echo "prerelease=false" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then
echo "release=bleeding" >> $GITHUB_ENV
echo "prerelease=true" >> $GITHUB_ENV
elif [[ "${GITHUB_REF}" == refs/tags/* ]]; then
echo "release=${GITHUB_REF_NAME}" >> $GITHUB_ENV
echo "prerelease=false" >> $GITHUB_ENV
else
echo "release=nightly" >> $GITHUB_ENV
echo "prerelease=false" >> $GITHUB_ENV
fi
- name: Install dependencies
shell: bash
run:
./scripts/vs/ci_install.sh
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Build projectGenerator CMDLine with oF
working-directory: ${{env.GITHUB_WORKSPACE}}
run:
msbuild ../openFrameworks/apps/projectGenerator/commandLine/commandLine.vcxproj /p:configuration=release /p:platform=${{ matrix.platform }} /p:PlatformToolset=v143
- name: Create projectGenerator cmd zip
shell: msys2 {0}
run:
../openFrameworks/apps/projectGenerator/scripts/vs/ci_cmd_package.sh
- name: Test cmdline
shell: msys2 {0}
run:
../openFrameworks/apps/projectGenerator/scripts/vs/test_cmdline.sh
- name: Build and Package projectGenerator VS GUI
shell: bash
run: |
cd ../openFrameworks/apps/projectGenerator/frontend
npm install
npm update
npm run dist:win64
cd dist
pwd
ls
- name: Create projectGenerator VS GUI package
shell: msys2 {0}
run:
../openFrameworks/apps/projectGenerator/scripts/vs/ci_frontend_package.sh
- name: Update CMD Gen Release
if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
uses: IsaacShelton/update-existing-release@v1.3.4
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.release }}
release: ${{ env.release }}
prerelease: ${{ env.release }}
replace: false
files: ../openFrameworks/apps/projectGenerator/commandLine/bin/projectGenerator-vs.zip
- name: Update Project Gen GUI Release
if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
uses: IsaacShelton/update-existing-release@v1.3.4
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.release }}
release: ${{ env.release }}
prerelease: ${{ env.release }}
replace: false
files: ../openFrameworks/apps/projectGenerator/frontend/dist/projectGenerator-vs-gui.zip