Skip to content

Commit

Permalink
Add github-actions continuous integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Wunkolo committed May 8, 2023
1 parent 87970d3 commit 1b7afa5
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build

on:
push:
paths-ignore:
- "**.md"
branches:
- main
- dev
pull_request:
paths-ignore:
- "**.md"
branches:
- main
release:

jobs:
windows-build:
runs-on: windows-latest
strategy:
matrix:
arch: [x86, x64, x64_arm64]

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "recursive"

- name: Configure msvc
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.arch}}

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles"

- name: Build
run: cmake --build ${{github.workspace}}/build --config Release --target SaiThumbs --parallel 8

- name: Zipping artifacts
run: >
7z a SaiThumbs-${{matrix.arch}}.zip
${{github.workspace}}/build/bin/install.bat
${{github.workspace}}/build/bin/uninstall.bat
${{github.workspace}}/build/bin/SaiThumbs.dll
- uses: actions/upload-artifact@v3
if: github.ref == 'refs/heads/main'
with:
name: SaiThumbs-${{matrix.arch}}
path: |
SaiThumbs-${{matrix.arch}}.zip
create-release:
if: github.ref == 'refs/heads/main'
needs: windows-build
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
id: download
uses: actions/download-artifact@v3
with:
path: artifacts

- name: Create release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "Latest Build"
files: ${{steps.download.outputs.download-path}}/*

0 comments on commit 1b7afa5

Please sign in to comment.