update CMakeLists.txt and releases #14
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- '*' | |
permissions: | |
contents: write | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build_linux_x86-64: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Packages | |
run: sudo apt install -y libboost-all-dev | |
- name: Configure Primal | |
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build Primal | |
run: cmake --build build --parallel 2 | |
- name: Rename Executable | |
run: mv bin/primal bin/primal_linux_x86-64 | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
path: bin/primal_linux_x86-64 | |
build_windows_x86-64: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Boost | |
uses: MarkusJx/[email protected] | |
id: boost | |
with: | |
boost_version: 1.73.0 | |
- name: Configure Primal | |
run: cmake -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
env: | |
BOOST_ROOT: ${{steps.boost.outputs.BOOST_ROOT}} | |
- name: Build Primal | |
run: cmake --build build --parallel 2 | |
- name: Rename Executable | |
run: mv bin/primal.exe bin/primal_windows_x86-64.exe | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
path: bin/primal_windows_x86-64.exe | |
release: | |
runs-on: ubuntu-latest | |
needs: [build_linux_x86-64, build_windows_x86-64] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
- name: Copy x86-64 Binaries to the Root Folder | |
run: | | |
cp artifact/primal_linux_x86-64 primal && cp artifact/primal_windows_x86-64.exe primal.exe | |
- name: Create x86-64 Packages | |
run: | | |
zip -r primal_windows_x86-64.zip primal.exe LICENSE.md | |
tar -czf primal_linux_x86-64.tar.gz primal LICENSE.md | |
- name: Release linux_x86-64 Version of Primal | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{secrets.GITHUB_TOKEN}} | |
file: primal_linux_x86-64.tar.gz | |
tag: ${{github.ref}} | |
- name: Release windows_x86-64 Version of Primal | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{secrets.GITHUB_TOKEN}} | |
file: primal_windows_x86-64.zip | |
tag: ${{github.ref}} |