Basic world storing #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows MSVC | |
on: | |
push: | |
pull_request: | |
release: | |
# tags: | |
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
build: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
name: "Windows MSVC 64", | |
os: windows-latest, | |
artifact: "windows_msvc_64.7z", | |
build_type: "Release", | |
arch: "x64", | |
archiver: "7z a", | |
generators: "Visual Studio 17 2022" | |
} | |
- { | |
name: "Windows MSVC 32", | |
os: windows-latest, | |
artifact: "windows_msvc_32.7z", | |
build_type: "Release", | |
arch: "Win32", | |
archiver: "7z a", | |
generators: "Visual Studio 17 2022" | |
} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Configure | |
shell: bash | |
run: | | |
mkdir build | |
mkdir instdir | |
cmake \ | |
-S . \ | |
-B . \ | |
-T "ClangCl" \ | |
-A ${{ matrix.config.arch }} \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \ | |
-G "${{ matrix.config.generators }}" \ | |
-DCMAKE_INSTALL_PREFIX:PATH=instdir | |
- name: Build | |
shell: bash | |
run: cmake --build . --config ${{ matrix.config.build_type }} | |
- name: Install Strip | |
shell: bash | |
run: cmake --install . --strip | |
- name: Pack | |
shell: bash | |
working-directory: instdir | |
run: | | |
ls -laR | |
${{ matrix.config.archiver }} ../${{ matrix.config.artifact }} . | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ./${{ matrix.config.artifact }} | |
name: ${{ matrix.config.artifact }} | |
- name: Upload release asset | |
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'created') | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./${{ matrix.config.artifact }} | |
asset_name: ${{ matrix.config.artifact }} | |
asset_content_type: application/x-7z-compressed |