-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* make builds every time (but release only on tags) * fix libclang issue for windows * include webgpu.h * re-implement wgpuGetVersion * Tweak versioning * comment * try to fix linux32 ci build * run release-builds on release only * adjust comment
- Loading branch information
1 parent
f534de7
commit 691468c
Showing
5 changed files
with
62 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,14 +102,14 @@ jobs: | |
- run: ${{ matrix.make_command }} | ||
shell: bash | ||
|
||
# Builds for binary releases. | ||
# Builds for binary releases. Run on tags starting with 'v'. | ||
# The Linux builds are performed on a "manylinux2010" container. This container | ||
# is designed such that that the resulting binary has minimal dependencies on system | ||
# libraries, and thus works on as many linuxes as possible. It's a thing from the | ||
# Python world, but generally useful. | ||
release-build: | ||
name: release-build - ${{ matrix.name }} | ||
if: contains(github.ref, 'tags/v') | ||
if: success() && contains(github.ref, 'tags/v') | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
|
@@ -144,8 +144,26 @@ jobs: | |
OS_NAME: windows | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'true' | ||
- name: set version (which gets baked into wgpuGetVersion) | ||
run: | | ||
echo "WGPU_NATIVE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Windows 64 deps | ||
if: success() && matrix.OS_NAME == 'windows' && matrix.ARCH == 64 | ||
run: | | ||
choco install -y --force llvm | exit 0 | ||
echo "LIBCLANG_PATH=C:\Program Files\LLVM\lib" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Windows 32 deps | ||
if: success() && matrix.OS_NAME == 'windows' && matrix.ARCH == 32 | ||
run: | | ||
choco install -y --force --x86 llvm | exit 0 | ||
echo "LIBCLANG_PATH=C:\Program Files (x86)\LLVM\lib" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Docker build | ||
if: success() && matrix.OS_NAME == 'Linux' | ||
if: success() && matrix.OS_NAME == 'linux' | ||
env: | ||
IMAGE: ${{ matrix.IMAGE }} | ||
RUST_TOOLCHAIN: ${{ matrix.RUST_TOOLCHAIN }} | ||
|
@@ -158,14 +176,14 @@ jobs: | |
curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none && \ | ||
rustup toolchain install --no-self-update $RUST_TOOLCHAIN && \ | ||
rustup default $RUST_TOOLCHAIN && \ | ||
yum install zip -y && \ | ||
yum install zip clang -y && \ | ||
make package") | ||
docker start -ai $CID | ||
mkdir -p dist | ||
docker cp $CID:/tmp/wgpu-native/dist/. dist/. | ||
docker rm $CID | ||
- name: Host build | ||
if: success() && matrix.OS_NAME != 'Linux' | ||
if: success() && matrix.OS_NAME != 'linux' | ||
env: | ||
RUST_TOOLCHAIN: ${{ matrix.RUST_TOOLCHAIN }} | ||
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.MACOSX_DEPLOYMENT_TARGET }} | ||
|
@@ -186,6 +204,7 @@ jobs: | |
mv dist/*release*.zip ./dist/wgpu-$OS_NAME-$ARCH-release.zip | ||
shell: bash | ||
- name: Publish | ||
if: success() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: dist | ||
|
@@ -242,6 +261,10 @@ jobs: | |
if: success() && contains(github.ref, 'tags/v') | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: set version (which gets used as release name) | ||
run: | | ||
echo "WGPU_NATIVE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Download assets | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -251,16 +274,13 @@ jobs: | |
GITHUB_SHA: ${{ github.sha }} | ||
run: | | ||
echo $GITHUB_SHA > dist/commit-sha | ||
- name: Get version from git ref | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
- name: Create release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.get_version.outputs.VERSION }} | ||
release_name: Release ${{ steps.get_version.outputs.VERSION }} | ||
tag_name: ${{ env.WGPU_NATIVE_VERSION }} | ||
release_name: ${{ env.WGPU_NATIVE_VERSION }} | ||
body: | | ||
Autogenerated binary modules. | ||
The Linux builds are built on CentOS 6 (glibc 2.12, see [Manylinux2010](https://www.python.org/dev/peps/pep-0571/)). | ||
|
@@ -271,6 +291,6 @@ jobs: | |
# Move back to official action after fix https://github.com/actions/upload-release-asset/issues/4 | ||
uses: AButler/[email protected] | ||
with: | ||
release-tag: ${{ steps.get_version.outputs.VERSION }} | ||
release-tag: ${{ env.WGPU_NATIVE_VERSION }} | ||
files: 'dist/*.zip;dist/commit-sha' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
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 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 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 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