Skip to content

Commit

Permalink
Merge pull request #7 from saxbophone/josh/initial-release-docs
Browse files Browse the repository at this point in the history
Initial public release
  • Loading branch information
saxbophone authored Sep 22, 2021
2 parents 92ed325 + b89cc98 commit aa3cc60
Show file tree
Hide file tree
Showing 21 changed files with 1,213 additions and 464 deletions.
80 changes: 21 additions & 59 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,77 +5,39 @@ on:
types: [published]

jobs:
build-release:
runs-on: ${{ matrix.os }}
env:
BUILD_TYPE: Release
strategy:
fail-fast: false
matrix:
# specify a specific compiler to build with each OS separately
include:
- platform_name: linux
os: ubuntu-20.04
cxx: g++-10
- platform_name: macos
os: macos-10.15
cxx: clang++
# NOTE: CXX seems to be ignored on Windows, but specify it anyway for consistency
- platform_name: windows
os: windows-2019
cxx: msvc

steps:
- uses: actions/checkout@v2

- name: Configure CMake
env:
CXX: ${{ matrix.cxx }}
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX:PATH=$GITHUB_WORKSPACE/artifacts

- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE

- name: Install
working-directory: ${{github.workspace}}/build
shell: bash
# Use CMake to "install" build artifacts (only interested in CMake registered targets) to our custom artifacts directory
run: cmake --install . --config $BUILD_TYPE

- name: Upload
uses: actions/upload-artifact@v2
with:
name: unmoving_build_${{ github.run_number }}_${{ matrix.platform_name }}
path: ${{github.workspace}}/artifacts
build-docs:
build:
runs-on: ubuntu-20.04
# don't deploy docs unless release build succeeds
needs: build-release
steps:
- uses: actions/checkout@v2
- name: Set Tag Name
shell: bash
# trim prefix from ref to get tag name
run: echo "TAG_NAME=${GITHUB_REF#'refs/tags/'}" >> $GITHUB_ENV
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Version-stamp Header file
env:
RELEASE_URL: ${{ steps.get_release.outputs.html_url }}
run: |
echo "// Unmoving $TAG_NAME downloaded from Github at $RELEASE_URL" > header_stub.hpp
cat header_stub.hpp unmoving/include/unmoving/PSXFixed.hpp > PSXFixed.hpp
- name: Upload Header file
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./PSXFixed.hpp
asset_name: PSXFixed.hpp
asset_content_type: text/plain
- name: Format Docs Version Name
shell: bash
# trim patch version off version number as minor version specifies ABI changes
run: echo "DOCS_VERSION=${TAG_NAME%.*}" >> $GITHUB_ENV
- name: Build Doxygen Docs
uses: mattnotmitt/[email protected]
- name: Set up latest docs auto-linking
shell: bash
working-directory: ${{github.workspace}}
# make docs folder, move docs there, call script to generate HTML redirect in index
run: |
mkdir docs
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ else()
set(UNMOVING_SUBPROJECT ON)
endif()

project(Unmoving VERSION 0.0.0 LANGUAGES CXX)
project(Unmoving VERSION 0.1.0 LANGUAGES CXX)

find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
Expand Down
Loading

0 comments on commit aa3cc60

Please sign in to comment.