Update release.yml #9
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
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. | |
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml | |
name: CMake on multiple platforms | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-linux: | |
runs-on: ubuntu-22.04 | |
strategy: | |
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install packages | |
run: sudo apt-get install gcc-multilib g++-multilib | |
- name: Build Linux (GCC) | |
run: gcc -std=c11 -m32 -shared -fPIC -Ofast -s -DNDEBUG prof.c -pthread -o libprof.so | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
# Artifact name | |
name: Linux Build | |
path: ./libprof.so | |
if-no-files-found: error | |
build-windows: | |
runs-on: windows-2019 | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Clang | |
uses: egor-tensin/setup-clang@v1 | |
with: | |
version: latest | |
platform: i686 | |
- name: Compile | |
run: clang -std=c11 -m32 -shared -Ofast3 -DNDEBUG -fuse-ld=lld-link prof.c -lws2_32 -o tracy.dll | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
# Artifact name | |
name: Windows Build | |
path: ./tracy.dll | |
if-no-files-found: error | |
release: | |
name: Create Release | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: [build-windows, build-linux] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: Windows Build | |
- uses: actions/download-artifact@v4 | |
with: | |
name: Linux Build | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
tracy.dll | |
libprof.so |