SIEdit/.github/workflows/ci.yml

75 lines
1.7 KiB
YAML
Raw Normal View History

2022-08-25 19:24:14 -04:00
name: CI
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
pull_request:
branches:
- master
paths-ignore:
- 'README.md'
jobs:
build:
runs-on: windows-latest
2022-08-25 20:31:01 -04:00
env:
FFMPEG_DIR: ffmpeg-n4.4-latest-win64-gpl-shared-4.4
2022-08-25 19:24:14 -04:00
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@v1
- name: Install Qt
uses: jurplel/install-qt-action@v3
2022-08-25 19:28:45 -04:00
- name: Install FFmpeg
shell: bash
run: |
2022-08-25 20:31:01 -04:00
curl -fLOSs https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/$FFMPEG_DIR.zip
7z x $FFMPEG_DIR.zip
echo "$FFMPEG_DIR" >> $GITHUB_PATH
2022-08-25 19:28:45 -04:00
2022-08-25 19:24:14 -04:00
- name: Build
shell: bash
run: |
cmake . -G Ninja -DCMAKE_BUILD_TYPE=Release
ninja
- name: Deploy
shell: bash
run: |
mkdir deploy
2022-08-25 20:17:44 -04:00
cp app/*.exe deploy
cp lib/*.dll deploy
2022-08-25 20:31:01 -04:00
cp $FFMPEG_DIR/bin/*.dll deploy
2022-08-25 19:24:14 -04:00
cd deploy
windeployqt si-edit.exe libweaver.dll
2022-08-25 20:23:20 -04:00
- name: Upload Build Artifact
2022-08-25 19:24:14 -04:00
uses: actions/upload-artifact@v2.2.1
with:
path:
2022-08-25 20:23:20 -04:00
deploy
2022-08-25 19:24:14 -04:00
- name: Upload to Releases
shell: bash
if: github.event_name == 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TRAVIS_REPO_SLUG: itsmattkc/libweaver
TRAVIS_COMMIT: ${{ github.sha }}
run: |
2022-08-25 20:23:20 -04:00
cd deploy
7z a libweaver.zip *
2022-08-25 19:24:14 -04:00
curl -fLOSs --retry 2 --retry-delay 60 https://github.com/probonopd/uploadtool/raw/master/upload.sh
2022-08-25 20:23:20 -04:00
./upload.sh libweaver.zip