windows-qa #440
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
# Generated by mk-workflows. | |
name: 'windows-qa' | |
on: | |
push: | |
branches-ignore: | |
- release | |
pull_request: | |
branches-ignore: | |
- release | |
schedule: | |
- cron: '0 0 * * *' | |
concurrency: | |
group: 'windows-qa-${{ github.ref }}' | |
cancel-in-progress: true | |
jobs: | |
windows-qa-stable-all-features: | |
runs-on: windows-2022 | |
# Containers are not supported on Windows. | |
# container: ghcr.io/pragmatrix/rust-skia-windows:latest | |
env: | |
SKIA_DEBUG: 0 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install Rust | |
uses: hecrj/[email protected] | |
with: | |
rust-version: stable | |
- name: Install Clippy | |
run: rustup component add clippy | |
shell: bash | |
- name: Python Version | |
run: python --version | |
- name: Upgrade LLVM | |
run: choco upgrade llvm | |
- name: 'Install Rust target x86_64-pc-windows-msvc' | |
shell: bash | |
run: | | |
rustup target add x86_64-pc-windows-msvc | |
- name: 'Build skia-safe for x86_64-pc-windows-msvc with features d3d,gl,svg,textlayout,vulkan,webp' | |
shell: bash | |
run: | | |
if [ "false" == "true" ]; then | |
TARGET=x86_64-pc-windows-msvc | |
TARGET=${TARGET//-/_} | |
export CC_${TARGET}=x86_64-pc-windows-msvc26-clang.exe | |
export CXX_${TARGET}=x86_64-pc-windows-msvc26-clang++.exe | |
export AR_${TARGET}=llvm-ar | |
TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` | |
export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-pc-windows-msvc26-clang.exe | |
echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" | |
fi | |
if [ "false" == "true" ]; then | |
source /emsdk/emsdk_env.sh | |
fi | |
cargo clean | |
cargo build -p skia-safe --release --features "d3d,gl,svg,textlayout,vulkan,webp" --target x86_64-pc-windows-msvc | |
echo "SKIA_BINARIES_TAG=$(cat "${BUILD_ARTIFACTSTAGINGDIRECTORY}/skia-binaries/tag.txt")" >> ${GITHUB_ENV} | |
echo "SKIA_BINARIES_KEY=$(cat "${BUILD_ARTIFACTSTAGINGDIRECTORY}/skia-binaries/key.txt")" >> ${GITHUB_ENV} | |
echo "SKIA_STAGING_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} | |
env: | |
BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} | |
EMCC_CFLAGS: "-s ERROR_ON_UNDEFINED_SYMBOLS=0 -s MAX_WEBGL_VERSION=2" | |
- name: 'Run Clippy' | |
shell: bash | |
if: true | |
run: | | |
cargo clippy --release --features "d3d,gl,svg,textlayout,vulkan,webp" --all-targets --target x86_64-pc-windows-msvc -- -D warnings | |
- name: 'Test all workspace projects' | |
shell: bash | |
if: true | |
run: | | |
cargo test --all --release --features "d3d,gl,svg,textlayout,vulkan,webp" --all-targets --target x86_64-pc-windows-msvc -- --nocapture | |
- name: 'Generate skia-org example images' | |
shell: bash | |
if: true | |
run: | | |
cargo run --release --features "d3d,gl,svg,textlayout,vulkan,webp" --target x86_64-pc-windows-msvc "${{ env.SKIA_STAGING_PATH }}/skia-org" --driver cpu --driver pdf --driver svg | |
- name: 'Upload skia-org example images' | |
if: true | |
uses: actions/[email protected] | |
with: | |
name: skia-org-images-x86_64-pc-windows-msvc | |
path: ${{ env.SKIA_STAGING_PATH }}/skia-org | |
- name: 'Compress binaries' | |
if: false | |
uses: a7ul/[email protected] | |
with: | |
command: c | |
cwd: '${{ env.SKIA_STAGING_PATH }}' | |
files: 'skia-binaries' | |
outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' | |
- name: 'Release binaries' | |
if: false | |
uses: pragmatrix/[email protected] | |
with: | |
owner: rust-skia | |
repo: skia-binaries | |
allowUpdates: true | |
replacesArtifacts: true | |
tag: '${{ env.SKIA_BINARIES_TAG }}' | |
artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' | |
artifactErrorsFailBuild: true | |
token: ${{ secrets.RUST_SKIA_RELEASE_TOKEN }} | |
prerelease: true | |
windows-qa-beta-all-features: | |
runs-on: windows-2022 | |
# Containers are not supported on Windows. | |
# container: ghcr.io/pragmatrix/rust-skia-windows:latest | |
env: | |
SKIA_DEBUG: 0 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install Rust | |
uses: hecrj/[email protected] | |
with: | |
rust-version: beta | |
- name: Install Clippy | |
run: rustup component add clippy | |
shell: bash | |
- name: Python Version | |
run: python --version | |
- name: Upgrade LLVM | |
run: choco upgrade llvm | |
- name: 'Install Rust target x86_64-pc-windows-msvc' | |
shell: bash | |
run: | | |
rustup target add x86_64-pc-windows-msvc | |
- name: 'Build skia-safe for x86_64-pc-windows-msvc with features d3d,gl,svg,textlayout,vulkan,webp' | |
shell: bash | |
run: | | |
if [ "false" == "true" ]; then | |
TARGET=x86_64-pc-windows-msvc | |
TARGET=${TARGET//-/_} | |
export CC_${TARGET}=x86_64-pc-windows-msvc26-clang.exe | |
export CXX_${TARGET}=x86_64-pc-windows-msvc26-clang++.exe | |
export AR_${TARGET}=llvm-ar | |
TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` | |
export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-pc-windows-msvc26-clang.exe | |
echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" | |
fi | |
if [ "false" == "true" ]; then | |
source /emsdk/emsdk_env.sh | |
fi | |
cargo clean | |
cargo build -p skia-safe --release --features "d3d,gl,svg,textlayout,vulkan,webp" --target x86_64-pc-windows-msvc | |
echo "SKIA_BINARIES_TAG=$(cat "${BUILD_ARTIFACTSTAGINGDIRECTORY}/skia-binaries/tag.txt")" >> ${GITHUB_ENV} | |
echo "SKIA_BINARIES_KEY=$(cat "${BUILD_ARTIFACTSTAGINGDIRECTORY}/skia-binaries/key.txt")" >> ${GITHUB_ENV} | |
echo "SKIA_STAGING_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} | |
env: | |
BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} | |
EMCC_CFLAGS: "-s ERROR_ON_UNDEFINED_SYMBOLS=0 -s MAX_WEBGL_VERSION=2" | |
- name: 'Run Clippy' | |
shell: bash | |
if: true | |
run: | | |
cargo clippy --release --features "d3d,gl,svg,textlayout,vulkan,webp" --all-targets --target x86_64-pc-windows-msvc -- -D warnings | |
- name: 'Test all workspace projects' | |
shell: bash | |
if: true | |
run: | | |
cargo test --all --release --features "d3d,gl,svg,textlayout,vulkan,webp" --all-targets --target x86_64-pc-windows-msvc -- --nocapture | |
- name: 'Generate skia-org example images' | |
shell: bash | |
if: false | |
run: | | |
cargo run --release --features "d3d,gl,svg,textlayout,vulkan,webp" --target x86_64-pc-windows-msvc "${{ env.SKIA_STAGING_PATH }}/skia-org" | |
- name: 'Upload skia-org example images' | |
if: false | |
uses: actions/[email protected] | |
with: | |
name: skia-org-images-x86_64-pc-windows-msvc | |
path: ${{ env.SKIA_STAGING_PATH }}/skia-org | |
- name: 'Compress binaries' | |
if: false | |
uses: a7ul/[email protected] | |
with: | |
command: c | |
cwd: '${{ env.SKIA_STAGING_PATH }}' | |
files: 'skia-binaries' | |
outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' | |
- name: 'Release binaries' | |
if: false | |
uses: pragmatrix/[email protected] | |
with: | |
owner: rust-skia | |
repo: skia-binaries | |
allowUpdates: true | |
replacesArtifacts: true | |
tag: '${{ env.SKIA_BINARIES_TAG }}' | |
artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' | |
artifactErrorsFailBuild: true | |
token: ${{ secrets.RUST_SKIA_RELEASE_TOKEN }} | |
prerelease: true |