Skip to content

GitHub Actions Fix Linux #736

GitHub Actions Fix Linux

GitHub Actions Fix Linux #736

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/tags/* ]]; then
echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
echo "PRERELEASE=false" >> $GITHUB_ENV
elif [[ "${{ 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
else
echo "RELEASE=bleeding" >> $GITHUB_ENV
echo "PRERELEASE=true" >> $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 Release CMD
if: github.repository == 'openframeworks/projectGenerator' && 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.0.8
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.RELEASE }}
files: ../openFrameworks/apps/projectGenerator/commandLine/bin/projectGenerator-vs.zip
- name: Update Release GUI
if: github.repository == 'openframeworks/projectGenerator' && 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.0.8
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ env.RELEASE }}
files: ../openFrameworks/apps/projectGenerator/frontend/dist/projectGenerator-vs-gui.zip