diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-10-04 14:40:34 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-04 14:40:34 -0400 |
| commit | 7c54489e1f4016852df84eece93ded672b1b468e (patch) | |
| tree | 4307ad8bb1775c64909cfad5598487c6de59b695 | |
| parent | 5fb74dbab1a257e59632671843537002d2dd408e (diff) | |
Set slang-tag-version.h on windows builds (#2429)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Create the slang-tag-version.h file on windows.
* Add non binary files to the artifact upload for windows.
* Add headers/docs to linux artifact.
| -rw-r--r-- | .github/workflows/linux.yml | 7 | ||||
| -rw-r--r-- | .github/workflows/release-windows.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/windows.yml | 10 | ||||
| -rw-r--r-- | make-slang-tag-version.bat | 5 |
4 files changed, 24 insertions, 0 deletions
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3d7ceee8b..f5fef03e5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -36,11 +36,18 @@ jobs: with: name: slang-build-${{matrix.configuration}}-${{matrix.platform}}-${{matrix.compiler}} path: | + slang.h + slang-com-helper.h + slang-com-ptr.h + slang-tag-version.h + slang-gfx.h + prelude/*.h bin/**/*.dll bin/**/*.exe bin/**/*.so bin/**/slangc bin/**/slangd + docs/*.md - name: test run: CONFIGURATION=${{matrix.configuration}} diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index 2ea80800d..c66e50b57 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -35,6 +35,8 @@ jobs: if: ${{ matrix.platform != 'aarch64' }} run: .\premake.bat vs2019 --enable-embed-stdlib=true --arch=${{matrix.platform}} --deps=true --no-progress=true + - name: tag-version + run: .\make-slang-tag-version.bat - name: msbuild run: MSBuild.exe slang.sln -v:m -m -property:Configuration=${{matrix.configuration}} -property:Platform=${{matrix.platform}} -property:WindowsTargetPlatformVersion=10.0.19041.0 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e201d4613..5bfe0be39 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -25,16 +25,26 @@ jobs: - name: build run: | .\premake.bat vs2019 --enable-embed-stdlib=true --arch=${{matrix.platform}} --deps=true --no-progress=true + + .\make-slang-tag-version.bat + MSBuild.exe slang.sln -v:m -m -property:Configuration=${{matrix.configuration}} -property:Platform=${{matrix.platform}} -property:WindowsTargetPlatformVersion=10.0.19041.0 -warnAsError - uses: actions/upload-artifact@v3 with: name: slang-build-${{matrix.configuration}}-${{matrix.platform}}-${{matrix.compiler}} path: | + slang.h + slang-com-helper.h + slang-com-ptr.h + slang-tag-version.h + slang-gfx.h + prelude/*.h bin/**/*.dll bin/**/*.exe bin/**/*.so bin/**/slangc bin/**/slangd + docs/*.md - name: test run: | if ("${{matrix.configuration}}" -eq "Debug") { diff --git a/make-slang-tag-version.bat b/make-slang-tag-version.bat new file mode 100644 index 000000000..3382783fa --- /dev/null +++ b/make-slang-tag-version.bat @@ -0,0 +1,5 @@ +@echo off +:: Generate slang version files +git describe --tags > slang-tag-version.txt +set /p SLANG_TAG_VERSION=<slang-tag-version.txt +echo #define SLANG_TAG_VERSION "%SLANG_TAG_VERSION%" > slang-tag-version.h |
