-configured Docker to build Linux release; #5
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: | |
branches: [ "master", "dev"] | |
jobs: | |
build-windows: | |
name: Build Windows version | |
runs-on: windows-latest | |
steps: | |
- name: Install ninja | |
run: choco install ninja | |
- uses: actions/checkout@v4 | |
- uses: rui314/setup-mold@v1 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Configure CMake | |
run: cmake --preset=msvc-release -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config Release | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: hypertextcpp-windows-latest | |
path: | | |
${{github.workspace}}/build/hypertextcpp.exe | |
release_hypertextcpp: | |
name: Release hypertextcpp | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
- name: Build linux version in Docker | |
run: DOCKER_BUILDKIT=1 docker build --build-arg cmake_preset=clang-release --output build . | |
- name: Run unit tests | |
working-directory: ${{github.workspace}}/build/tests | |
run: ./test_hypertextcpp | |
- name: Download hypertextcpp Windows build | |
uses: actions/download-artifact@v4 | |
with: | |
name: hypertextcpp-windows-latest | |
path: build | |
- name: Test | |
shell: bash | |
run: ls build/hypertextcpp && ls build/hypertextcpp.exe |