Skip to content

Commit

Permalink
Add a release pipeline (#1)
Browse files Browse the repository at this point in the history
* add initial build workflow

* change vs-version

* change versions

* add arch preference

* remove versions

There is only one version on the Actions hosted runner

* change compiled config

* using a .sln for compilation

* add build flags

* change build config

* change build config

* include underdered_map

* change build config

* add thread import

* add matrix strategy for config targets

* add matrix strategy for config targets

* comment out builds for testing

* add zipping and release steps

* add quotes around vars

* add  needed for windows runner

* remove extra $

* change runner attribute

* change variable calls

* change variable calls

* add tag to release

* change target archive path

* change artifacts to archive

* change target archive path

* change release path

* add dir list step

* add dir list step

* change release target

* split release and build into two jobs

* remove extentions for upload

* use published tag in upload

* remove tag

* allow updating existing releases

* add zip as an extention

* remove zip as an extention from upload

* change wildcard on release step

* uncommend build targets

---------

Co-authored-by: redshift0345 <[email protected]>
  • Loading branch information
redshift0345 and rs0345 authored May 5, 2024
1 parent 19c4383 commit 95b3755
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Deploy PengEngine

on:
push:
tags:
- '**'
jobs:
build:
strategy:
matrix:
configuration: [Master, Release, Development, Debug]
os: [windows-latest]

env:
binary_path: D:\a\PengEngine\PengEngine\\out\x64\${{ matrix.configuration }}\
archive_name: '${{ github.event.repository.name }}-${{ matrix.configuration }}-${{ github.ref_name }}'
name: Build on windows
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64

- name: Build app for release
run: msbuild /p:configuration=${{ matrix.configuration }} /t:rebuild PengEngine.sln

- name: Zip the project
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: "${{ env.archive_name }}.zip"
path: "${{ env.binary_path }}"

- name: Cache artifacts
uses: actions/upload-artifact@v4
with:
name: "${{ env.archive_name }}"
path: "*.zip"
overwrite: true
retention-days: 1

release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R

- name: Upload Release
uses: ncipollo/release-action@v1
with:
artifacts: "*/*.zip"
token: ${{ secrets.API_TOKEN }}
allowUpdates: true
1 change: 1 addition & 0 deletions src/rendering/mesh_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <fstream>
#include <filesystem>
#include <unordered_map>

#include <core/logger.h>
#include <profiling/scoped_event.h>
Expand Down
2 changes: 2 additions & 0 deletions src/utils/timing.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <thread>

#include "timing.h"

namespace timing
Expand Down

0 comments on commit 95b3755

Please sign in to comment.