Skip to content

Commit

Permalink
0.4 prep (#18)
Browse files Browse the repository at this point in the history
* Created a version header
* Testing release workflow
  • Loading branch information
samkusin authored Nov 4, 2022
1 parent 5a9e0c6 commit ec388a5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 13 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: CMake
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: CMake

on:
push:
branches: [ "main" ]
branches: [ 'main' ]
tags: ['v*']
pull_request:
branches: [ "main" ]
branches: [ 'main' ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand All @@ -30,19 +31,22 @@ jobs:
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -G "Visual Studio 17 2022" -A x64 -DBUILD_TESTING=OFF
run: |
echo ${{ github.event_name }}
echo ${{ github.ref_name }}
echo ${{ github.ref_type }}
cmake -B ${{github.workspace}}/build -G "Visual Studio 17 2022" -A x64 -DBUILD_TESTING=OFF
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

# - name: Archive production artifacts
# uses: actions/upload-artifact@v3
# with:
# name: dist
# path: ${{github.workspace}}/build-run/clemens_iigs/Release/*
# retention-days: 1

- name: Archive production artifacts
if: ${{ github.ref_type == 'tag'}}
uses: actions/upload-artifact@v3
with:
name: clemens-${{github.ref_name}}-${{runner.os}}-${{runner.arch}}.zip
path: ${{github.workspace}}/build-run/clemens_iigs/Release/*

# - name: Test
# working-directory: ${{github.workspace}}/build
Expand Down
4 changes: 3 additions & 1 deletion host/clem_front.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "version.h"
#include "clem_front.hpp"
#include "clem_backend.hpp"
#include "clem_disk_utils.hpp"
Expand Down Expand Up @@ -343,7 +344,8 @@ ClemensFrontend::ClemensFrontend(const cinek::ByteBuffer &systemFontLoBuffer,

debugMemoryEditor_.ReadFn = &ClemensFrontend::imguiMemoryEditorRead;
debugMemoryEditor_.WriteFn = &ClemensFrontend::imguiMemoryEditorWrite;
CLEM_TERM_COUT.print(TerminalLine::Info, "Welcome to the Clemens IIgs Emulator");
CLEM_TERM_COUT.format(TerminalLine::Info, "Welcome to the Clemens IIgs Emulator {}.{}",
CLEM_HOST_VERSION_MAJOR, CLEM_HOST_VERSION_MINOR);
}

ClemensFrontend::~ClemensFrontend() {
Expand Down
7 changes: 7 additions & 0 deletions host/version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef CLEM_HOST_VERSION_H
#define CLEM_HOST_VERSION_H

#define CLEM_HOST_VERSION_MAJOR 0
#define CLEM_HOST_VERSION_MINOR 4

#endif

0 comments on commit ec388a5

Please sign in to comment.