diff --git a/.github/workflows/fmt.yaml b/.github/workflows/fmt.yaml new file mode 100644 index 000000000..402e305dc --- /dev/null +++ b/.github/workflows/fmt.yaml @@ -0,0 +1,21 @@ +name: 'Check Formatting' +on: [push] + +jobs: + check-fmt: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + submodules: true + - name: Install Rust + run: | + rustup update stable + rustup default stable + rustup component add rustfmt + - name: Generate missing bindings.rs file + run: | + echo > skia-bindings/src/bindings.rs + - run: | + cargo fmt -- --check diff --git a/.github/workflows/linux-qa.yaml b/.github/workflows/linux-qa.yaml new file mode 100644 index 000000000..9c1620b0a --- /dev/null +++ b/.github/workflows/linux-qa.yaml @@ -0,0 +1,933 @@ +# Generated by mk-workflows. + +name: 'linux-qa' +on: + push: + branches-ignore: + - release + schedule: + - cron: '0 0 * * *' + +concurrency: + group: 'linux-qa-${{ github.ref }}' + cancel-in-progress: true + +jobs: + linux-qa-stable-all-features: + runs-on: ubuntu-20.04 + container: ghcr.io/pragmatrix/rust-skia-linux:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Prepare Rustup + run: (cd /github/home && ln -s /root/.cargo) + + - name: Update Rustup and Rust + run: rustup update + + - name: Configure Rust Toolchain + run: rustup default stable + + - name: Install Clippy + run: rustup component add clippy + - name: 'Install Rust target x86_64-unknown-linux-gnu' + shell: bash + run: | + rustup target add x86_64-unknown-linux-gnu + + - name: 'Build all targets in skia-safe for x86_64-unknown-linux-gnu with features egl,gl,textlayout,vulkan,wayland,webp,x11' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-unknown-linux-gnu + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-unknown-linux-gnu26-clang + export CXX_${TARGET}=x86_64-unknown-linux-gnu26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-unknown-linux-gnu26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "egl,gl,textlayout,vulkan,wayland,webp,x11" --target x86_64-unknown-linux-gnu + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "egl,gl,textlayout,vulkan,wayland,webp,x11" --all-targets --target x86_64-unknown-linux-gnu -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "egl,gl,textlayout,vulkan,wayland,webp,x11" --all-targets --target x86_64-unknown-linux-gnu -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: true + run: | + cargo run --release --features "egl,gl,textlayout,vulkan,wayland,webp,x11" --target x86_64-unknown-linux-gnu "${{ runner.temp }}/skia-org" --driver cpu --driver pdf --driver svg + + - name: 'Upload skia-org example images' + if: true + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-unknown-linux-gnu + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-linux-android' + shell: bash + run: | + rustup target add aarch64-linux-android + + - name: 'Build all targets in skia-safe for aarch64-linux-android with features gl,textlayout,vulkan,webp' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=aarch64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-linux-android26-clang + export CXX_${TARGET}=aarch64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout,vulkan,webp" --target aarch64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout,vulkan,webp" --all-targets --target aarch64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout,vulkan,webp" --all-targets --target aarch64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout,vulkan,webp" --target aarch64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-linux-android' + shell: bash + run: | + rustup target add x86_64-linux-android + + - name: 'Build all targets in skia-safe for x86_64-linux-android with features gl,textlayout,vulkan,webp' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=x86_64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-linux-android26-clang + export CXX_${TARGET}=x86_64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout,vulkan,webp" --target x86_64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout,vulkan,webp" --all-targets --target x86_64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout,vulkan,webp" --all-targets --target x86_64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout,vulkan,webp" --target x86_64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target i686-linux-android' + shell: bash + run: | + rustup target add i686-linux-android + + - name: 'Build all targets in skia-safe for i686-linux-android with features gl,textlayout,vulkan,webp' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=i686-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=i686-linux-android26-clang + export CXX_${TARGET}=i686-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=i686-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout,vulkan,webp" --target i686-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout,vulkan,webp" --all-targets --target i686-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout,vulkan,webp" --all-targets --target i686-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout,vulkan,webp" --target i686-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-i686-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + linux-qa-stable-all-features-debug: + runs-on: ubuntu-20.04 + container: ghcr.io/pragmatrix/rust-skia-linux:latest + env: + SKIA_DEBUG: 1 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Prepare Rustup + run: (cd /github/home && ln -s /root/.cargo) + + - name: Update Rustup and Rust + run: rustup update + + - name: Configure Rust Toolchain + run: rustup default stable + + - name: Install Clippy + run: rustup component add clippy + - name: 'Install Rust target x86_64-unknown-linux-gnu' + shell: bash + run: | + rustup target add x86_64-unknown-linux-gnu + + - name: 'Build all targets in skia-safe for x86_64-unknown-linux-gnu with features egl,gl,textlayout,vulkan,wayland,webp,x11' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-unknown-linux-gnu + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-unknown-linux-gnu26-clang + export CXX_${TARGET}=x86_64-unknown-linux-gnu26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-unknown-linux-gnu26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "egl,gl,textlayout,vulkan,wayland,webp,x11" --target x86_64-unknown-linux-gnu + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "egl,gl,textlayout,vulkan,wayland,webp,x11" --all-targets --target x86_64-unknown-linux-gnu -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "egl,gl,textlayout,vulkan,wayland,webp,x11" --all-targets --target x86_64-unknown-linux-gnu -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "egl,gl,textlayout,vulkan,wayland,webp,x11" --target x86_64-unknown-linux-gnu "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-unknown-linux-gnu + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-linux-android' + shell: bash + run: | + rustup target add aarch64-linux-android + + - name: 'Build all targets in skia-safe for aarch64-linux-android with features gl,textlayout,vulkan,webp' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=aarch64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-linux-android26-clang + export CXX_${TARGET}=aarch64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout,vulkan,webp" --target aarch64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout,vulkan,webp" --all-targets --target aarch64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout,vulkan,webp" --all-targets --target aarch64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout,vulkan,webp" --target aarch64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-linux-android' + shell: bash + run: | + rustup target add x86_64-linux-android + + - name: 'Build all targets in skia-safe for x86_64-linux-android with features gl,textlayout,vulkan,webp' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=x86_64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-linux-android26-clang + export CXX_${TARGET}=x86_64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout,vulkan,webp" --target x86_64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout,vulkan,webp" --all-targets --target x86_64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout,vulkan,webp" --all-targets --target x86_64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout,vulkan,webp" --target x86_64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target i686-linux-android' + shell: bash + run: | + rustup target add i686-linux-android + + - name: 'Build all targets in skia-safe for i686-linux-android with features gl,textlayout,vulkan,webp' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=i686-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=i686-linux-android26-clang + export CXX_${TARGET}=i686-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=i686-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout,vulkan,webp" --target i686-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout,vulkan,webp" --all-targets --target i686-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout,vulkan,webp" --all-targets --target i686-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout,vulkan,webp" --target i686-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-i686-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + linux-qa-beta-all-features: + runs-on: ubuntu-20.04 + container: ghcr.io/pragmatrix/rust-skia-linux:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Prepare Rustup + run: (cd /github/home && ln -s /root/.cargo) + + - name: Update Rustup and Rust + run: rustup update + + - name: Configure Rust Toolchain + run: rustup default beta + + - name: Install Clippy + run: rustup component add clippy + - name: 'Install Rust target x86_64-unknown-linux-gnu' + shell: bash + run: | + rustup target add x86_64-unknown-linux-gnu + + - name: 'Build all targets in skia-safe for x86_64-unknown-linux-gnu with features egl,gl,textlayout,vulkan,wayland,webp,x11' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-unknown-linux-gnu + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-unknown-linux-gnu26-clang + export CXX_${TARGET}=x86_64-unknown-linux-gnu26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-unknown-linux-gnu26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "egl,gl,textlayout,vulkan,wayland,webp,x11" --target x86_64-unknown-linux-gnu + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "egl,gl,textlayout,vulkan,wayland,webp,x11" --all-targets --target x86_64-unknown-linux-gnu -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "egl,gl,textlayout,vulkan,wayland,webp,x11" --all-targets --target x86_64-unknown-linux-gnu -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "egl,gl,textlayout,vulkan,wayland,webp,x11" --target x86_64-unknown-linux-gnu "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-unknown-linux-gnu + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-linux-android' + shell: bash + run: | + rustup target add aarch64-linux-android + + - name: 'Build all targets in skia-safe for aarch64-linux-android with features gl,textlayout,vulkan,webp' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=aarch64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-linux-android26-clang + export CXX_${TARGET}=aarch64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout,vulkan,webp" --target aarch64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout,vulkan,webp" --all-targets --target aarch64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout,vulkan,webp" --all-targets --target aarch64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout,vulkan,webp" --target aarch64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-linux-android' + shell: bash + run: | + rustup target add x86_64-linux-android + + - name: 'Build all targets in skia-safe for x86_64-linux-android with features gl,textlayout,vulkan,webp' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=x86_64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-linux-android26-clang + export CXX_${TARGET}=x86_64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout,vulkan,webp" --target x86_64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout,vulkan,webp" --all-targets --target x86_64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout,vulkan,webp" --all-targets --target x86_64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout,vulkan,webp" --target x86_64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target i686-linux-android' + shell: bash + run: | + rustup target add i686-linux-android + + - name: 'Build all targets in skia-safe for i686-linux-android with features gl,textlayout,vulkan,webp' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=i686-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=i686-linux-android26-clang + export CXX_${TARGET}=i686-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=i686-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout,vulkan,webp" --target i686-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout,vulkan,webp" --all-targets --target i686-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout,vulkan,webp" --all-targets --target i686-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout,vulkan,webp" --target i686-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-i686-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true \ No newline at end of file diff --git a/.github/workflows/linux-release.yaml b/.github/workflows/linux-release.yaml new file mode 100644 index 000000000..f2179b4cd --- /dev/null +++ b/.github/workflows/linux-release.yaml @@ -0,0 +1,2767 @@ +# Generated by mk-workflows. + +name: 'linux-release' +on: + push: + branches: + - release + +concurrency: + group: 'linux-release-${{ github.ref }}' + cancel-in-progress: true + +jobs: + linux-release-release: + runs-on: ubuntu-20.04 + container: ghcr.io/pragmatrix/rust-skia-linux:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Prepare Rustup + run: (cd /github/home && ln -s /root/.cargo) + + - name: Update Rustup and Rust + run: rustup update + + - name: Configure Rust Toolchain + run: rustup default stable + + - name: Install Clippy + run: rustup component add clippy + - name: 'Install Rust target x86_64-unknown-linux-gnu' + shell: bash + run: | + rustup target add x86_64-unknown-linux-gnu + + - name: 'Build all targets in skia-safe for x86_64-unknown-linux-gnu with features ' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-unknown-linux-gnu + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-unknown-linux-gnu26-clang + export CXX_${TARGET}=x86_64-unknown-linux-gnu26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-unknown-linux-gnu26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "" --target x86_64-unknown-linux-gnu + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "" --all-targets --target x86_64-unknown-linux-gnu -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "" --all-targets --target x86_64-unknown-linux-gnu -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "" --target x86_64-unknown-linux-gnu "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-unknown-linux-gnu + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-linux-android' + shell: bash + run: | + rustup target add aarch64-linux-android + + - name: 'Build all targets in skia-safe for aarch64-linux-android with features ' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=aarch64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-linux-android26-clang + export CXX_${TARGET}=aarch64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "" --target aarch64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "" --all-targets --target aarch64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "" --all-targets --target aarch64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "" --target aarch64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-linux-android' + shell: bash + run: | + rustup target add x86_64-linux-android + + - name: 'Build all targets in skia-safe for x86_64-linux-android with features ' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=x86_64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-linux-android26-clang + export CXX_${TARGET}=x86_64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "" --target x86_64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "" --all-targets --target x86_64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "" --all-targets --target x86_64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "" --target x86_64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target i686-linux-android' + shell: bash + run: | + rustup target add i686-linux-android + + - name: 'Build all targets in skia-safe for i686-linux-android with features ' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=i686-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=i686-linux-android26-clang + export CXX_${TARGET}=i686-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=i686-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "" --target i686-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "" --all-targets --target i686-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "" --all-targets --target i686-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "" --target i686-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-i686-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + linux-release-release-gl: + runs-on: ubuntu-20.04 + container: ghcr.io/pragmatrix/rust-skia-linux:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Prepare Rustup + run: (cd /github/home && ln -s /root/.cargo) + + - name: Update Rustup and Rust + run: rustup update + + - name: Configure Rust Toolchain + run: rustup default stable + + - name: Install Clippy + run: rustup component add clippy + - name: 'Install Rust target x86_64-unknown-linux-gnu' + shell: bash + run: | + rustup target add x86_64-unknown-linux-gnu + + - name: 'Build all targets in skia-safe for x86_64-unknown-linux-gnu with features gl' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-unknown-linux-gnu + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-unknown-linux-gnu26-clang + export CXX_${TARGET}=x86_64-unknown-linux-gnu26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-unknown-linux-gnu26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl" --target x86_64-unknown-linux-gnu + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "gl" --all-targets --target x86_64-unknown-linux-gnu -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "gl" --all-targets --target x86_64-unknown-linux-gnu -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl" --target x86_64-unknown-linux-gnu "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-unknown-linux-gnu + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-linux-android' + shell: bash + run: | + rustup target add aarch64-linux-android + + - name: 'Build all targets in skia-safe for aarch64-linux-android with features gl' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=aarch64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-linux-android26-clang + export CXX_${TARGET}=aarch64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl" --target aarch64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl" --all-targets --target aarch64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl" --all-targets --target aarch64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl" --target aarch64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-linux-android' + shell: bash + run: | + rustup target add x86_64-linux-android + + - name: 'Build all targets in skia-safe for x86_64-linux-android with features gl' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=x86_64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-linux-android26-clang + export CXX_${TARGET}=x86_64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl" --target x86_64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl" --all-targets --target x86_64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl" --all-targets --target x86_64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl" --target x86_64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target i686-linux-android' + shell: bash + run: | + rustup target add i686-linux-android + + - name: 'Build all targets in skia-safe for i686-linux-android with features gl' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=i686-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=i686-linux-android26-clang + export CXX_${TARGET}=i686-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=i686-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl" --target i686-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl" --all-targets --target i686-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl" --all-targets --target i686-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl" --target i686-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-i686-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + linux-release-release-vulkan: + runs-on: ubuntu-20.04 + container: ghcr.io/pragmatrix/rust-skia-linux:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Prepare Rustup + run: (cd /github/home && ln -s /root/.cargo) + + - name: Update Rustup and Rust + run: rustup update + + - name: Configure Rust Toolchain + run: rustup default stable + + - name: Install Clippy + run: rustup component add clippy + - name: 'Install Rust target x86_64-unknown-linux-gnu' + shell: bash + run: | + rustup target add x86_64-unknown-linux-gnu + + - name: 'Build all targets in skia-safe for x86_64-unknown-linux-gnu with features vulkan' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-unknown-linux-gnu + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-unknown-linux-gnu26-clang + export CXX_${TARGET}=x86_64-unknown-linux-gnu26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-unknown-linux-gnu26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan" --target x86_64-unknown-linux-gnu + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "vulkan" --all-targets --target x86_64-unknown-linux-gnu -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "vulkan" --all-targets --target x86_64-unknown-linux-gnu -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan" --target x86_64-unknown-linux-gnu "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-unknown-linux-gnu + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-linux-android' + shell: bash + run: | + rustup target add aarch64-linux-android + + - name: 'Build all targets in skia-safe for aarch64-linux-android with features vulkan' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=aarch64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-linux-android26-clang + export CXX_${TARGET}=aarch64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan" --target aarch64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "vulkan" --all-targets --target aarch64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "vulkan" --all-targets --target aarch64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan" --target aarch64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-linux-android' + shell: bash + run: | + rustup target add x86_64-linux-android + + - name: 'Build all targets in skia-safe for x86_64-linux-android with features vulkan' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=x86_64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-linux-android26-clang + export CXX_${TARGET}=x86_64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan" --target x86_64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "vulkan" --all-targets --target x86_64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "vulkan" --all-targets --target x86_64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan" --target x86_64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target i686-linux-android' + shell: bash + run: | + rustup target add i686-linux-android + + - name: 'Build all targets in skia-safe for i686-linux-android with features vulkan' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=i686-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=i686-linux-android26-clang + export CXX_${TARGET}=i686-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=i686-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan" --target i686-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "vulkan" --all-targets --target i686-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "vulkan" --all-targets --target i686-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan" --target i686-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-i686-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + linux-release-release-textlayout: + runs-on: ubuntu-20.04 + container: ghcr.io/pragmatrix/rust-skia-linux:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Prepare Rustup + run: (cd /github/home && ln -s /root/.cargo) + + - name: Update Rustup and Rust + run: rustup update + + - name: Configure Rust Toolchain + run: rustup default stable + + - name: Install Clippy + run: rustup component add clippy + - name: 'Install Rust target x86_64-unknown-linux-gnu' + shell: bash + run: | + rustup target add x86_64-unknown-linux-gnu + + - name: 'Build all targets in skia-safe for x86_64-unknown-linux-gnu with features textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-unknown-linux-gnu + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-unknown-linux-gnu26-clang + export CXX_${TARGET}=x86_64-unknown-linux-gnu26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-unknown-linux-gnu26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "textlayout" --target x86_64-unknown-linux-gnu + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "textlayout" --all-targets --target x86_64-unknown-linux-gnu -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "textlayout" --all-targets --target x86_64-unknown-linux-gnu -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "textlayout" --target x86_64-unknown-linux-gnu "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-unknown-linux-gnu + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-linux-android' + shell: bash + run: | + rustup target add aarch64-linux-android + + - name: 'Build all targets in skia-safe for aarch64-linux-android with features textlayout' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=aarch64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-linux-android26-clang + export CXX_${TARGET}=aarch64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "textlayout" --target aarch64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "textlayout" --all-targets --target aarch64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "textlayout" --all-targets --target aarch64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "textlayout" --target aarch64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-linux-android' + shell: bash + run: | + rustup target add x86_64-linux-android + + - name: 'Build all targets in skia-safe for x86_64-linux-android with features textlayout' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=x86_64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-linux-android26-clang + export CXX_${TARGET}=x86_64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "textlayout" --target x86_64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "textlayout" --all-targets --target x86_64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "textlayout" --all-targets --target x86_64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "textlayout" --target x86_64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target i686-linux-android' + shell: bash + run: | + rustup target add i686-linux-android + + - name: 'Build all targets in skia-safe for i686-linux-android with features textlayout' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=i686-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=i686-linux-android26-clang + export CXX_${TARGET}=i686-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=i686-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "textlayout" --target i686-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "textlayout" --all-targets --target i686-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "textlayout" --all-targets --target i686-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "textlayout" --target i686-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-i686-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + linux-release-release-gl-textlayout: + runs-on: ubuntu-20.04 + container: ghcr.io/pragmatrix/rust-skia-linux:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Prepare Rustup + run: (cd /github/home && ln -s /root/.cargo) + + - name: Update Rustup and Rust + run: rustup update + + - name: Configure Rust Toolchain + run: rustup default stable + + - name: Install Clippy + run: rustup component add clippy + - name: 'Install Rust target x86_64-unknown-linux-gnu' + shell: bash + run: | + rustup target add x86_64-unknown-linux-gnu + + - name: 'Build all targets in skia-safe for x86_64-unknown-linux-gnu with features gl,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-unknown-linux-gnu + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-unknown-linux-gnu26-clang + export CXX_${TARGET}=x86_64-unknown-linux-gnu26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-unknown-linux-gnu26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout" --target x86_64-unknown-linux-gnu + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "gl,textlayout" --all-targets --target x86_64-unknown-linux-gnu -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "gl,textlayout" --all-targets --target x86_64-unknown-linux-gnu -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout" --target x86_64-unknown-linux-gnu "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-unknown-linux-gnu + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-linux-android' + shell: bash + run: | + rustup target add aarch64-linux-android + + - name: 'Build all targets in skia-safe for aarch64-linux-android with features gl,textlayout' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=aarch64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-linux-android26-clang + export CXX_${TARGET}=aarch64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout" --target aarch64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout" --all-targets --target aarch64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout" --all-targets --target aarch64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout" --target aarch64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-linux-android' + shell: bash + run: | + rustup target add x86_64-linux-android + + - name: 'Build all targets in skia-safe for x86_64-linux-android with features gl,textlayout' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=x86_64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-linux-android26-clang + export CXX_${TARGET}=x86_64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout" --target x86_64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout" --all-targets --target x86_64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout" --all-targets --target x86_64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout" --target x86_64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target i686-linux-android' + shell: bash + run: | + rustup target add i686-linux-android + + - name: 'Build all targets in skia-safe for i686-linux-android with features gl,textlayout' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=i686-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=i686-linux-android26-clang + export CXX_${TARGET}=i686-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=i686-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout" --target i686-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout" --all-targets --target i686-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout" --all-targets --target i686-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout" --target i686-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-i686-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + linux-release-release-vulkan-textlayout: + runs-on: ubuntu-20.04 + container: ghcr.io/pragmatrix/rust-skia-linux:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Prepare Rustup + run: (cd /github/home && ln -s /root/.cargo) + + - name: Update Rustup and Rust + run: rustup update + + - name: Configure Rust Toolchain + run: rustup default stable + + - name: Install Clippy + run: rustup component add clippy + - name: 'Install Rust target x86_64-unknown-linux-gnu' + shell: bash + run: | + rustup target add x86_64-unknown-linux-gnu + + - name: 'Build all targets in skia-safe for x86_64-unknown-linux-gnu with features vulkan,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-unknown-linux-gnu + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-unknown-linux-gnu26-clang + export CXX_${TARGET}=x86_64-unknown-linux-gnu26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-unknown-linux-gnu26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan,textlayout" --target x86_64-unknown-linux-gnu + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "vulkan,textlayout" --all-targets --target x86_64-unknown-linux-gnu -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "vulkan,textlayout" --all-targets --target x86_64-unknown-linux-gnu -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan,textlayout" --target x86_64-unknown-linux-gnu "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-unknown-linux-gnu + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-linux-android' + shell: bash + run: | + rustup target add aarch64-linux-android + + - name: 'Build all targets in skia-safe for aarch64-linux-android with features vulkan,textlayout' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=aarch64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-linux-android26-clang + export CXX_${TARGET}=aarch64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan,textlayout" --target aarch64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "vulkan,textlayout" --all-targets --target aarch64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "vulkan,textlayout" --all-targets --target aarch64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan,textlayout" --target aarch64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-linux-android' + shell: bash + run: | + rustup target add x86_64-linux-android + + - name: 'Build all targets in skia-safe for x86_64-linux-android with features vulkan,textlayout' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=x86_64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-linux-android26-clang + export CXX_${TARGET}=x86_64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan,textlayout" --target x86_64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "vulkan,textlayout" --all-targets --target x86_64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "vulkan,textlayout" --all-targets --target x86_64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan,textlayout" --target x86_64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target i686-linux-android' + shell: bash + run: | + rustup target add i686-linux-android + + - name: 'Build all targets in skia-safe for i686-linux-android with features vulkan,textlayout' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=i686-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=i686-linux-android26-clang + export CXX_${TARGET}=i686-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=i686-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan,textlayout" --target i686-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "vulkan,textlayout" --all-targets --target i686-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "vulkan,textlayout" --all-targets --target i686-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan,textlayout" --target i686-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-i686-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + linux-release-release-gl-vulkan-textlayout: + runs-on: ubuntu-20.04 + container: ghcr.io/pragmatrix/rust-skia-linux:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Prepare Rustup + run: (cd /github/home && ln -s /root/.cargo) + + - name: Update Rustup and Rust + run: rustup update + + - name: Configure Rust Toolchain + run: rustup default stable + + - name: Install Clippy + run: rustup component add clippy + - name: 'Install Rust target x86_64-unknown-linux-gnu' + shell: bash + run: | + rustup target add x86_64-unknown-linux-gnu + + - name: 'Build all targets in skia-safe for x86_64-unknown-linux-gnu with features gl,vulkan,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-unknown-linux-gnu + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-unknown-linux-gnu26-clang + export CXX_${TARGET}=x86_64-unknown-linux-gnu26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-unknown-linux-gnu26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,vulkan,textlayout" --target x86_64-unknown-linux-gnu + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "gl,vulkan,textlayout" --all-targets --target x86_64-unknown-linux-gnu -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "gl,vulkan,textlayout" --all-targets --target x86_64-unknown-linux-gnu -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,vulkan,textlayout" --target x86_64-unknown-linux-gnu "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-unknown-linux-gnu + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-linux-android' + shell: bash + run: | + rustup target add aarch64-linux-android + + - name: 'Build all targets in skia-safe for aarch64-linux-android with features gl,vulkan,textlayout' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=aarch64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-linux-android26-clang + export CXX_${TARGET}=aarch64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,vulkan,textlayout" --target aarch64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,vulkan,textlayout" --all-targets --target aarch64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,vulkan,textlayout" --all-targets --target aarch64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,vulkan,textlayout" --target aarch64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-linux-android' + shell: bash + run: | + rustup target add x86_64-linux-android + + - name: 'Build all targets in skia-safe for x86_64-linux-android with features gl,vulkan,textlayout' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=x86_64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-linux-android26-clang + export CXX_${TARGET}=x86_64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,vulkan,textlayout" --target x86_64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,vulkan,textlayout" --all-targets --target x86_64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,vulkan,textlayout" --all-targets --target x86_64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,vulkan,textlayout" --target x86_64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target i686-linux-android' + shell: bash + run: | + rustup target add i686-linux-android + + - name: 'Build all targets in skia-safe for i686-linux-android with features gl,vulkan,textlayout' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=i686-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=i686-linux-android26-clang + export CXX_${TARGET}=i686-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=i686-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,vulkan,textlayout" --target i686-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,vulkan,textlayout" --all-targets --target i686-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,vulkan,textlayout" --all-targets --target i686-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,vulkan,textlayout" --target i686-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-i686-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + linux-release-release-gl-x11: + runs-on: ubuntu-20.04 + container: ghcr.io/pragmatrix/rust-skia-linux:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Prepare Rustup + run: (cd /github/home && ln -s /root/.cargo) + + - name: Update Rustup and Rust + run: rustup update + + - name: Configure Rust Toolchain + run: rustup default stable + + - name: Install Clippy + run: rustup component add clippy + - name: 'Install Rust target x86_64-unknown-linux-gnu' + shell: bash + run: | + rustup target add x86_64-unknown-linux-gnu + + - name: 'Build all targets in skia-safe for x86_64-unknown-linux-gnu with features gl,x11' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-unknown-linux-gnu + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-unknown-linux-gnu26-clang + export CXX_${TARGET}=x86_64-unknown-linux-gnu26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-unknown-linux-gnu26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,x11" --target x86_64-unknown-linux-gnu + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "gl,x11" --all-targets --target x86_64-unknown-linux-gnu -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "gl,x11" --all-targets --target x86_64-unknown-linux-gnu -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,x11" --target x86_64-unknown-linux-gnu "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-unknown-linux-gnu + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-linux-android' + shell: bash + run: | + rustup target add aarch64-linux-android + + - name: 'Build all targets in skia-safe for aarch64-linux-android with features gl,x11' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=aarch64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-linux-android26-clang + export CXX_${TARGET}=aarch64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,x11" --target aarch64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,x11" --all-targets --target aarch64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,x11" --all-targets --target aarch64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,x11" --target aarch64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-linux-android' + shell: bash + run: | + rustup target add x86_64-linux-android + + - name: 'Build all targets in skia-safe for x86_64-linux-android with features gl,x11' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=x86_64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-linux-android26-clang + export CXX_${TARGET}=x86_64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,x11" --target x86_64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,x11" --all-targets --target x86_64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,x11" --all-targets --target x86_64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,x11" --target x86_64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target i686-linux-android' + shell: bash + run: | + rustup target add i686-linux-android + + - name: 'Build all targets in skia-safe for i686-linux-android with features gl,x11' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=i686-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=i686-linux-android26-clang + export CXX_${TARGET}=i686-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=i686-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,x11" --target i686-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,x11" --all-targets --target i686-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,x11" --all-targets --target i686-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,x11" --target i686-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-i686-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + linux-release-release-gl-textlayout-x11: + runs-on: ubuntu-20.04 + container: ghcr.io/pragmatrix/rust-skia-linux:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Prepare Rustup + run: (cd /github/home && ln -s /root/.cargo) + + - name: Update Rustup and Rust + run: rustup update + + - name: Configure Rust Toolchain + run: rustup default stable + + - name: Install Clippy + run: rustup component add clippy + - name: 'Install Rust target x86_64-unknown-linux-gnu' + shell: bash + run: | + rustup target add x86_64-unknown-linux-gnu + + - name: 'Build all targets in skia-safe for x86_64-unknown-linux-gnu with features gl,textlayout,x11' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-unknown-linux-gnu + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-unknown-linux-gnu26-clang + export CXX_${TARGET}=x86_64-unknown-linux-gnu26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-unknown-linux-gnu26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout,x11" --target x86_64-unknown-linux-gnu + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "gl,textlayout,x11" --all-targets --target x86_64-unknown-linux-gnu -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "gl,textlayout,x11" --all-targets --target x86_64-unknown-linux-gnu -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout,x11" --target x86_64-unknown-linux-gnu "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-unknown-linux-gnu + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-linux-android' + shell: bash + run: | + rustup target add aarch64-linux-android + + - name: 'Build all targets in skia-safe for aarch64-linux-android with features gl,textlayout,x11' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=aarch64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-linux-android26-clang + export CXX_${TARGET}=aarch64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout,x11" --target aarch64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout,x11" --all-targets --target aarch64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout,x11" --all-targets --target aarch64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout,x11" --target aarch64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-linux-android' + shell: bash + run: | + rustup target add x86_64-linux-android + + - name: 'Build all targets in skia-safe for x86_64-linux-android with features gl,textlayout,x11' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=x86_64-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-linux-android26-clang + export CXX_${TARGET}=x86_64-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout,x11" --target x86_64-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout,x11" --all-targets --target x86_64-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout,x11" --all-targets --target x86_64-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout,x11" --target x86_64-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target i686-linux-android' + shell: bash + run: | + rustup target add i686-linux-android + + - name: 'Build all targets in skia-safe for i686-linux-android with features gl,textlayout,x11' + shell: bash + run: | + if [ "true" == "true" ]; then + TARGET=i686-linux-android + TARGET=${TARGET//-/_} + export CC_${TARGET}=i686-linux-android26-clang + export CXX_${TARGET}=i686-linux-android26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=i686-linux-android26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout,x11" --target i686-linux-android + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout,x11" --all-targets --target i686-linux-android -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout,x11" --all-targets --target i686-linux-android -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout,x11" --target i686-linux-android "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-i686-linux-android + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true \ No newline at end of file diff --git a/.github/workflows/macos-qa.yaml b/.github/workflows/macos-qa.yaml new file mode 100644 index 000000000..4862d9221 --- /dev/null +++ b/.github/workflows/macos-qa.yaml @@ -0,0 +1,717 @@ +# Generated by mk-workflows. + +name: 'macos-qa' +on: + push: + branches-ignore: + - release + schedule: + - cron: '0 0 * * *' + +concurrency: + group: 'macos-qa-${{ github.ref }}' + cancel-in-progress: true + +jobs: + macos-qa-stable-all-features: + runs-on: macOS-10.15 + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + + # remove LLVM on macOS so that only Apple's clang is used + - name: Remove LLVM (macOS) + run: brew uninstall llvm + - name: 'Install Rust target x86_64-apple-darwin' + shell: bash + run: | + rustup target add x86_64-apple-darwin + + - name: 'Build all targets in skia-safe for x86_64-apple-darwin with features gl,metal,textlayout,vulkan,webp' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-darwin + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-darwin26-clang + export CXX_${TARGET}=x86_64-apple-darwin26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-darwin26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,metal,textlayout,vulkan,webp" --target x86_64-apple-darwin + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target x86_64-apple-darwin -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target x86_64-apple-darwin -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: true + run: | + cargo run --release --features "gl,metal,textlayout,vulkan,webp" --target x86_64-apple-darwin "${{ runner.temp }}/skia-org" --driver cpu --driver pdf --driver svg + + - name: 'Upload skia-org example images' + if: true + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-darwin + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-apple-ios' + shell: bash + run: | + rustup target add aarch64-apple-ios + + - name: 'Build all targets in skia-safe for aarch64-apple-ios with features gl,metal,textlayout,vulkan,webp' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=aarch64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-apple-ios26-clang + export CXX_${TARGET}=aarch64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,metal,textlayout,vulkan,webp" --target aarch64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target aarch64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target aarch64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,metal,textlayout,vulkan,webp" --target aarch64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-apple-ios' + shell: bash + run: | + rustup target add x86_64-apple-ios + + - name: 'Build all targets in skia-safe for x86_64-apple-ios with features gl,metal,textlayout,vulkan,webp' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-ios26-clang + export CXX_${TARGET}=x86_64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,metal,textlayout,vulkan,webp" --target x86_64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target x86_64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target x86_64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,metal,textlayout,vulkan,webp" --target x86_64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + macos-qa-stable-all-features-debug: + runs-on: macOS-10.15 + env: + SKIA_DEBUG: 1 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + + # remove LLVM on macOS so that only Apple's clang is used + - name: Remove LLVM (macOS) + run: brew uninstall llvm + - name: 'Install Rust target x86_64-apple-darwin' + shell: bash + run: | + rustup target add x86_64-apple-darwin + + - name: 'Build all targets in skia-safe for x86_64-apple-darwin with features gl,metal,textlayout,vulkan,webp' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-darwin + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-darwin26-clang + export CXX_${TARGET}=x86_64-apple-darwin26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-darwin26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,metal,textlayout,vulkan,webp" --target x86_64-apple-darwin + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target x86_64-apple-darwin -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target x86_64-apple-darwin -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,metal,textlayout,vulkan,webp" --target x86_64-apple-darwin "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-darwin + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-apple-ios' + shell: bash + run: | + rustup target add aarch64-apple-ios + + - name: 'Build all targets in skia-safe for aarch64-apple-ios with features gl,metal,textlayout,vulkan,webp' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=aarch64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-apple-ios26-clang + export CXX_${TARGET}=aarch64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,metal,textlayout,vulkan,webp" --target aarch64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target aarch64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target aarch64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,metal,textlayout,vulkan,webp" --target aarch64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-apple-ios' + shell: bash + run: | + rustup target add x86_64-apple-ios + + - name: 'Build all targets in skia-safe for x86_64-apple-ios with features gl,metal,textlayout,vulkan,webp' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-ios26-clang + export CXX_${TARGET}=x86_64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,metal,textlayout,vulkan,webp" --target x86_64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target x86_64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target x86_64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,metal,textlayout,vulkan,webp" --target x86_64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + macos-qa-beta-all-features: + runs-on: macOS-10.15 + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: beta + + - name: Install Clippy + run: rustup component add clippy + + # remove LLVM on macOS so that only Apple's clang is used + - name: Remove LLVM (macOS) + run: brew uninstall llvm + - name: 'Install Rust target x86_64-apple-darwin' + shell: bash + run: | + rustup target add x86_64-apple-darwin + + - name: 'Build all targets in skia-safe for x86_64-apple-darwin with features gl,metal,textlayout,vulkan,webp' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-darwin + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-darwin26-clang + export CXX_${TARGET}=x86_64-apple-darwin26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-darwin26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,metal,textlayout,vulkan,webp" --target x86_64-apple-darwin + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target x86_64-apple-darwin -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target x86_64-apple-darwin -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,metal,textlayout,vulkan,webp" --target x86_64-apple-darwin "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-darwin + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-apple-ios' + shell: bash + run: | + rustup target add aarch64-apple-ios + + - name: 'Build all targets in skia-safe for aarch64-apple-ios with features gl,metal,textlayout,vulkan,webp' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=aarch64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-apple-ios26-clang + export CXX_${TARGET}=aarch64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,metal,textlayout,vulkan,webp" --target aarch64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target aarch64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target aarch64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,metal,textlayout,vulkan,webp" --target aarch64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-apple-ios' + shell: bash + run: | + rustup target add x86_64-apple-ios + + - name: 'Build all targets in skia-safe for x86_64-apple-ios with features gl,metal,textlayout,vulkan,webp' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-ios26-clang + export CXX_${TARGET}=x86_64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,metal,textlayout,vulkan,webp" --target x86_64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target x86_64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,metal,textlayout,vulkan,webp" --all-targets --target x86_64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,metal,textlayout,vulkan,webp" --target x86_64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true \ No newline at end of file diff --git a/.github/workflows/macos-release.yaml b/.github/workflows/macos-release.yaml new file mode 100644 index 000000000..19ebcd5b0 --- /dev/null +++ b/.github/workflows/macos-release.yaml @@ -0,0 +1,2119 @@ +# Generated by mk-workflows. + +name: 'macos-release' +on: + push: + branches: + - release + +concurrency: + group: 'macos-release-${{ github.ref }}' + cancel-in-progress: true + +jobs: + macos-release-release: + runs-on: macOS-10.15 + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + + # remove LLVM on macOS so that only Apple's clang is used + - name: Remove LLVM (macOS) + run: brew uninstall llvm + - name: 'Install Rust target x86_64-apple-darwin' + shell: bash + run: | + rustup target add x86_64-apple-darwin + + - name: 'Build all targets in skia-safe for x86_64-apple-darwin with features ' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-darwin + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-darwin26-clang + export CXX_${TARGET}=x86_64-apple-darwin26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-darwin26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "" --target x86_64-apple-darwin + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "" --all-targets --target x86_64-apple-darwin -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "" --all-targets --target x86_64-apple-darwin -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "" --target x86_64-apple-darwin "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-darwin + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-apple-ios' + shell: bash + run: | + rustup target add aarch64-apple-ios + + - name: 'Build all targets in skia-safe for aarch64-apple-ios with features ' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=aarch64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-apple-ios26-clang + export CXX_${TARGET}=aarch64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "" --target aarch64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "" --all-targets --target aarch64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "" --all-targets --target aarch64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "" --target aarch64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-apple-ios' + shell: bash + run: | + rustup target add x86_64-apple-ios + + - name: 'Build all targets in skia-safe for x86_64-apple-ios with features ' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-ios26-clang + export CXX_${TARGET}=x86_64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "" --target x86_64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "" --all-targets --target x86_64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "" --all-targets --target x86_64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "" --target x86_64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + macos-release-release-gl: + runs-on: macOS-10.15 + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + + # remove LLVM on macOS so that only Apple's clang is used + - name: Remove LLVM (macOS) + run: brew uninstall llvm + - name: 'Install Rust target x86_64-apple-darwin' + shell: bash + run: | + rustup target add x86_64-apple-darwin + + - name: 'Build all targets in skia-safe for x86_64-apple-darwin with features gl' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-darwin + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-darwin26-clang + export CXX_${TARGET}=x86_64-apple-darwin26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-darwin26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl" --target x86_64-apple-darwin + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "gl" --all-targets --target x86_64-apple-darwin -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "gl" --all-targets --target x86_64-apple-darwin -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl" --target x86_64-apple-darwin "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-darwin + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-apple-ios' + shell: bash + run: | + rustup target add aarch64-apple-ios + + - name: 'Build all targets in skia-safe for aarch64-apple-ios with features gl' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=aarch64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-apple-ios26-clang + export CXX_${TARGET}=aarch64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl" --target aarch64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl" --all-targets --target aarch64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl" --all-targets --target aarch64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl" --target aarch64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-apple-ios' + shell: bash + run: | + rustup target add x86_64-apple-ios + + - name: 'Build all targets in skia-safe for x86_64-apple-ios with features gl' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-ios26-clang + export CXX_${TARGET}=x86_64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl" --target x86_64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl" --all-targets --target x86_64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl" --all-targets --target x86_64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl" --target x86_64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + macos-release-release-vulkan: + runs-on: macOS-10.15 + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + + # remove LLVM on macOS so that only Apple's clang is used + - name: Remove LLVM (macOS) + run: brew uninstall llvm + - name: 'Install Rust target x86_64-apple-darwin' + shell: bash + run: | + rustup target add x86_64-apple-darwin + + - name: 'Build all targets in skia-safe for x86_64-apple-darwin with features vulkan' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-darwin + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-darwin26-clang + export CXX_${TARGET}=x86_64-apple-darwin26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-darwin26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan" --target x86_64-apple-darwin + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "vulkan" --all-targets --target x86_64-apple-darwin -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "vulkan" --all-targets --target x86_64-apple-darwin -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan" --target x86_64-apple-darwin "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-darwin + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-apple-ios' + shell: bash + run: | + rustup target add aarch64-apple-ios + + - name: 'Build all targets in skia-safe for aarch64-apple-ios with features vulkan' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=aarch64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-apple-ios26-clang + export CXX_${TARGET}=aarch64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan" --target aarch64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "vulkan" --all-targets --target aarch64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "vulkan" --all-targets --target aarch64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan" --target aarch64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-apple-ios' + shell: bash + run: | + rustup target add x86_64-apple-ios + + - name: 'Build all targets in skia-safe for x86_64-apple-ios with features vulkan' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-ios26-clang + export CXX_${TARGET}=x86_64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan" --target x86_64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "vulkan" --all-targets --target x86_64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "vulkan" --all-targets --target x86_64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan" --target x86_64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + macos-release-release-textlayout: + runs-on: macOS-10.15 + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + + # remove LLVM on macOS so that only Apple's clang is used + - name: Remove LLVM (macOS) + run: brew uninstall llvm + - name: 'Install Rust target x86_64-apple-darwin' + shell: bash + run: | + rustup target add x86_64-apple-darwin + + - name: 'Build all targets in skia-safe for x86_64-apple-darwin with features textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-darwin + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-darwin26-clang + export CXX_${TARGET}=x86_64-apple-darwin26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-darwin26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "textlayout" --target x86_64-apple-darwin + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "textlayout" --all-targets --target x86_64-apple-darwin -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "textlayout" --all-targets --target x86_64-apple-darwin -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "textlayout" --target x86_64-apple-darwin "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-darwin + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-apple-ios' + shell: bash + run: | + rustup target add aarch64-apple-ios + + - name: 'Build all targets in skia-safe for aarch64-apple-ios with features textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=aarch64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-apple-ios26-clang + export CXX_${TARGET}=aarch64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "textlayout" --target aarch64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "textlayout" --all-targets --target aarch64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "textlayout" --all-targets --target aarch64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "textlayout" --target aarch64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-apple-ios' + shell: bash + run: | + rustup target add x86_64-apple-ios + + - name: 'Build all targets in skia-safe for x86_64-apple-ios with features textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-ios26-clang + export CXX_${TARGET}=x86_64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "textlayout" --target x86_64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "textlayout" --all-targets --target x86_64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "textlayout" --all-targets --target x86_64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "textlayout" --target x86_64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + macos-release-release-gl-textlayout: + runs-on: macOS-10.15 + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + + # remove LLVM on macOS so that only Apple's clang is used + - name: Remove LLVM (macOS) + run: brew uninstall llvm + - name: 'Install Rust target x86_64-apple-darwin' + shell: bash + run: | + rustup target add x86_64-apple-darwin + + - name: 'Build all targets in skia-safe for x86_64-apple-darwin with features gl,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-darwin + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-darwin26-clang + export CXX_${TARGET}=x86_64-apple-darwin26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-darwin26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout" --target x86_64-apple-darwin + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "gl,textlayout" --all-targets --target x86_64-apple-darwin -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "gl,textlayout" --all-targets --target x86_64-apple-darwin -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout" --target x86_64-apple-darwin "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-darwin + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-apple-ios' + shell: bash + run: | + rustup target add aarch64-apple-ios + + - name: 'Build all targets in skia-safe for aarch64-apple-ios with features gl,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=aarch64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-apple-ios26-clang + export CXX_${TARGET}=aarch64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout" --target aarch64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout" --all-targets --target aarch64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout" --all-targets --target aarch64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout" --target aarch64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-apple-ios' + shell: bash + run: | + rustup target add x86_64-apple-ios + + - name: 'Build all targets in skia-safe for x86_64-apple-ios with features gl,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-ios26-clang + export CXX_${TARGET}=x86_64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout" --target x86_64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,textlayout" --all-targets --target x86_64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,textlayout" --all-targets --target x86_64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout" --target x86_64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + macos-release-release-vulkan-textlayout: + runs-on: macOS-10.15 + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + + # remove LLVM on macOS so that only Apple's clang is used + - name: Remove LLVM (macOS) + run: brew uninstall llvm + - name: 'Install Rust target x86_64-apple-darwin' + shell: bash + run: | + rustup target add x86_64-apple-darwin + + - name: 'Build all targets in skia-safe for x86_64-apple-darwin with features vulkan,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-darwin + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-darwin26-clang + export CXX_${TARGET}=x86_64-apple-darwin26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-darwin26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan,textlayout" --target x86_64-apple-darwin + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "vulkan,textlayout" --all-targets --target x86_64-apple-darwin -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "vulkan,textlayout" --all-targets --target x86_64-apple-darwin -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan,textlayout" --target x86_64-apple-darwin "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-darwin + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-apple-ios' + shell: bash + run: | + rustup target add aarch64-apple-ios + + - name: 'Build all targets in skia-safe for aarch64-apple-ios with features vulkan,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=aarch64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-apple-ios26-clang + export CXX_${TARGET}=aarch64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan,textlayout" --target aarch64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "vulkan,textlayout" --all-targets --target aarch64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "vulkan,textlayout" --all-targets --target aarch64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan,textlayout" --target aarch64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-apple-ios' + shell: bash + run: | + rustup target add x86_64-apple-ios + + - name: 'Build all targets in skia-safe for x86_64-apple-ios with features vulkan,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-ios26-clang + export CXX_${TARGET}=x86_64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan,textlayout" --target x86_64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "vulkan,textlayout" --all-targets --target x86_64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "vulkan,textlayout" --all-targets --target x86_64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan,textlayout" --target x86_64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + macos-release-release-gl-vulkan-textlayout: + runs-on: macOS-10.15 + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + + # remove LLVM on macOS so that only Apple's clang is used + - name: Remove LLVM (macOS) + run: brew uninstall llvm + - name: 'Install Rust target x86_64-apple-darwin' + shell: bash + run: | + rustup target add x86_64-apple-darwin + + - name: 'Build all targets in skia-safe for x86_64-apple-darwin with features gl,vulkan,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-darwin + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-darwin26-clang + export CXX_${TARGET}=x86_64-apple-darwin26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-darwin26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,vulkan,textlayout" --target x86_64-apple-darwin + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "gl,vulkan,textlayout" --all-targets --target x86_64-apple-darwin -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "gl,vulkan,textlayout" --all-targets --target x86_64-apple-darwin -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,vulkan,textlayout" --target x86_64-apple-darwin "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-darwin + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-apple-ios' + shell: bash + run: | + rustup target add aarch64-apple-ios + + - name: 'Build all targets in skia-safe for aarch64-apple-ios with features gl,vulkan,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=aarch64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-apple-ios26-clang + export CXX_${TARGET}=aarch64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,vulkan,textlayout" --target aarch64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,vulkan,textlayout" --all-targets --target aarch64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,vulkan,textlayout" --all-targets --target aarch64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,vulkan,textlayout" --target aarch64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-apple-ios' + shell: bash + run: | + rustup target add x86_64-apple-ios + + - name: 'Build all targets in skia-safe for x86_64-apple-ios with features gl,vulkan,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-ios26-clang + export CXX_${TARGET}=x86_64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,vulkan,textlayout" --target x86_64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "gl,vulkan,textlayout" --all-targets --target x86_64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "gl,vulkan,textlayout" --all-targets --target x86_64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,vulkan,textlayout" --target x86_64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + macos-release-release-metal: + runs-on: macOS-10.15 + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + + # remove LLVM on macOS so that only Apple's clang is used + - name: Remove LLVM (macOS) + run: brew uninstall llvm + - name: 'Install Rust target x86_64-apple-darwin' + shell: bash + run: | + rustup target add x86_64-apple-darwin + + - name: 'Build all targets in skia-safe for x86_64-apple-darwin with features metal' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-darwin + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-darwin26-clang + export CXX_${TARGET}=x86_64-apple-darwin26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-darwin26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "metal" --target x86_64-apple-darwin + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "metal" --all-targets --target x86_64-apple-darwin -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "metal" --all-targets --target x86_64-apple-darwin -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "metal" --target x86_64-apple-darwin "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-darwin + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-apple-ios' + shell: bash + run: | + rustup target add aarch64-apple-ios + + - name: 'Build all targets in skia-safe for aarch64-apple-ios with features metal' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=aarch64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-apple-ios26-clang + export CXX_${TARGET}=aarch64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "metal" --target aarch64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "metal" --all-targets --target aarch64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "metal" --all-targets --target aarch64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "metal" --target aarch64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-apple-ios' + shell: bash + run: | + rustup target add x86_64-apple-ios + + - name: 'Build all targets in skia-safe for x86_64-apple-ios with features metal' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-ios26-clang + export CXX_${TARGET}=x86_64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "metal" --target x86_64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "metal" --all-targets --target x86_64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "metal" --all-targets --target x86_64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "metal" --target x86_64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + macos-release-release-metal-textlayout: + runs-on: macOS-10.15 + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + + # remove LLVM on macOS so that only Apple's clang is used + - name: Remove LLVM (macOS) + run: brew uninstall llvm + - name: 'Install Rust target x86_64-apple-darwin' + shell: bash + run: | + rustup target add x86_64-apple-darwin + + - name: 'Build all targets in skia-safe for x86_64-apple-darwin with features metal,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-darwin + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-darwin26-clang + export CXX_${TARGET}=x86_64-apple-darwin26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-darwin26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "metal,textlayout" --target x86_64-apple-darwin + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "metal,textlayout" --all-targets --target x86_64-apple-darwin -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: true + run: | + cargo test --all --release --features "metal,textlayout" --all-targets --target x86_64-apple-darwin -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "metal,textlayout" --target x86_64-apple-darwin "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-darwin + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target aarch64-apple-ios' + shell: bash + run: | + rustup target add aarch64-apple-ios + + - name: 'Build all targets in skia-safe for aarch64-apple-ios with features metal,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=aarch64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=aarch64-apple-ios26-clang + export CXX_${TARGET}=aarch64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=aarch64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "metal,textlayout" --target aarch64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "metal,textlayout" --all-targets --target aarch64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "metal,textlayout" --all-targets --target aarch64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "metal,textlayout" --target aarch64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-aarch64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + - name: 'Install Rust target x86_64-apple-ios' + shell: bash + run: | + rustup target add x86_64-apple-ios + + - name: 'Build all targets in skia-safe for x86_64-apple-ios with features metal,textlayout' + shell: bash + run: | + if [ "false" == "true" ]; then + TARGET=x86_64-apple-ios + TARGET=${TARGET//-/_} + export CC_${TARGET}=x86_64-apple-ios26-clang + export CXX_${TARGET}=x86_64-apple-ios26-clang++ + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=x86_64-apple-ios26-clang + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "metal,textlayout" --target x86_64-apple-ios + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: false + run: | + cargo clippy --release --features "metal,textlayout" --all-targets --target x86_64-apple-ios -- -D warnings + + - name: 'Test all workspace projects' + shell: bash + if: false + run: | + cargo test --all --release --features "metal,textlayout" --all-targets --target x86_64-apple-ios -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "metal,textlayout" --target x86_64-apple-ios "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-apple-ios + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true \ No newline at end of file diff --git a/.github/workflows/windows-qa.yaml b/.github/workflows/windows-qa.yaml new file mode 100644 index 000000000..0d002af86 --- /dev/null +++ b/.github/workflows/windows-qa.yaml @@ -0,0 +1,324 @@ +# Generated by mk-workflows. + +name: 'windows-qa' +on: + push: + 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-2019 + # Containers are not supported on Windows. + # container: ghcr.io/pragmatrix/rust-skia-windows:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + shell: bash + + - name: Setup Python 2 + uses: actions/setup-python@v2 + with: + python-version: '2.7.18' + architecture: 'x64' + + - name: Python Version + run: python --version + + - name: Install LLVM + run: choco install llvm + - name: 'Install Rust target x86_64-pc-windows-msvc' + shell: bash + run: | + rustup target add x86_64-pc-windows-msvc + + - name: 'Build all targets in skia-safe for x86_64-pc-windows-msvc with features d3d,gl,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 + 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 + cargo clean + cargo build -p skia-safe --all-targets --release --features "d3d,gl,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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "d3d,gl,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,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,textlayout,vulkan,webp" --target x86_64-pc-windows-msvc "${{ runner.temp }}/skia-org" --driver cpu --driver pdf --driver svg + + - name: 'Upload skia-org example images' + if: true + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-pc-windows-msvc + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + windows-qa-stable-all-features-debug: + runs-on: windows-2019 + # Containers are not supported on Windows. + # container: ghcr.io/pragmatrix/rust-skia-windows:latest + env: + SKIA_DEBUG: 1 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + shell: bash + + - name: Setup Python 2 + uses: actions/setup-python@v2 + with: + python-version: '2.7.18' + architecture: 'x64' + + - name: Python Version + run: python --version + + - name: Install LLVM + run: choco install llvm + - name: 'Install Rust target x86_64-pc-windows-msvc' + shell: bash + run: | + rustup target add x86_64-pc-windows-msvc + + - name: 'Build all targets in skia-safe for x86_64-pc-windows-msvc with features d3d,gl,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 + 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 + cargo clean + cargo build -p skia-safe --all-targets --release --features "d3d,gl,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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "d3d,gl,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,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,textlayout,vulkan,webp" --target x86_64-pc-windows-msvc "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-pc-windows-msvc + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + windows-qa-beta-all-features: + runs-on: windows-2019 + # Containers are not supported on Windows. + # container: ghcr.io/pragmatrix/rust-skia-windows:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: beta + + - name: Install Clippy + run: rustup component add clippy + shell: bash + + - name: Setup Python 2 + uses: actions/setup-python@v2 + with: + python-version: '2.7.18' + architecture: 'x64' + + - name: Python Version + run: python --version + + - name: Install LLVM + run: choco install llvm + - name: 'Install Rust target x86_64-pc-windows-msvc' + shell: bash + run: | + rustup target add x86_64-pc-windows-msvc + + - name: 'Build all targets in skia-safe for x86_64-pc-windows-msvc with features d3d,gl,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 + 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 + cargo clean + cargo build -p skia-safe --all-targets --release --features "d3d,gl,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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "d3d,gl,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,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,textlayout,vulkan,webp" --target x86_64-pc-windows-msvc "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-pc-windows-msvc + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: false + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: false + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true \ No newline at end of file diff --git a/.github/workflows/windows-release.yaml b/.github/workflows/windows-release.yaml new file mode 100644 index 000000000..86e66a6cd --- /dev/null +++ b/.github/workflows/windows-release.yaml @@ -0,0 +1,940 @@ +# Generated by mk-workflows. + +name: 'windows-release' +on: + push: + branches: + - release + +concurrency: + group: 'windows-release-${{ github.ref }}' + cancel-in-progress: true + +jobs: + windows-release-release: + runs-on: windows-2019 + # Containers are not supported on Windows. + # container: ghcr.io/pragmatrix/rust-skia-windows:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + shell: bash + + - name: Setup Python 2 + uses: actions/setup-python@v2 + with: + python-version: '2.7.18' + architecture: 'x64' + + - name: Python Version + run: python --version + + - name: Install LLVM + run: choco install llvm + - name: 'Install Rust target x86_64-pc-windows-msvc' + shell: bash + run: | + rustup target add x86_64-pc-windows-msvc + + - name: 'Build all targets in skia-safe for x86_64-pc-windows-msvc with features ' + 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 + 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 + cargo clean + cargo build -p skia-safe --all-targets --release --features "" --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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "" --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 "" --all-targets --target x86_64-pc-windows-msvc -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "" --target x86_64-pc-windows-msvc "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-pc-windows-msvc + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + windows-release-release-gl: + runs-on: windows-2019 + # Containers are not supported on Windows. + # container: ghcr.io/pragmatrix/rust-skia-windows:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + shell: bash + + - name: Setup Python 2 + uses: actions/setup-python@v2 + with: + python-version: '2.7.18' + architecture: 'x64' + + - name: Python Version + run: python --version + + - name: Install LLVM + run: choco install llvm + - name: 'Install Rust target x86_64-pc-windows-msvc' + shell: bash + run: | + rustup target add x86_64-pc-windows-msvc + + - name: 'Build all targets in skia-safe for x86_64-pc-windows-msvc with features gl' + 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 + 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 + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl" --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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "gl" --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 "gl" --all-targets --target x86_64-pc-windows-msvc -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl" --target x86_64-pc-windows-msvc "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-pc-windows-msvc + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + windows-release-release-vulkan: + runs-on: windows-2019 + # Containers are not supported on Windows. + # container: ghcr.io/pragmatrix/rust-skia-windows:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + shell: bash + + - name: Setup Python 2 + uses: actions/setup-python@v2 + with: + python-version: '2.7.18' + architecture: 'x64' + + - name: Python Version + run: python --version + + - name: Install LLVM + run: choco install llvm + - name: 'Install Rust target x86_64-pc-windows-msvc' + shell: bash + run: | + rustup target add x86_64-pc-windows-msvc + + - name: 'Build all targets in skia-safe for x86_64-pc-windows-msvc with features vulkan' + 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 + 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 + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan" --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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "vulkan" --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 "vulkan" --all-targets --target x86_64-pc-windows-msvc -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan" --target x86_64-pc-windows-msvc "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-pc-windows-msvc + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + windows-release-release-textlayout: + runs-on: windows-2019 + # Containers are not supported on Windows. + # container: ghcr.io/pragmatrix/rust-skia-windows:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + shell: bash + + - name: Setup Python 2 + uses: actions/setup-python@v2 + with: + python-version: '2.7.18' + architecture: 'x64' + + - name: Python Version + run: python --version + + - name: Install LLVM + run: choco install llvm + - name: 'Install Rust target x86_64-pc-windows-msvc' + shell: bash + run: | + rustup target add x86_64-pc-windows-msvc + + - name: 'Build all targets in skia-safe for x86_64-pc-windows-msvc with features textlayout' + 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 + 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 + cargo clean + cargo build -p skia-safe --all-targets --release --features "textlayout" --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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "textlayout" --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 "textlayout" --all-targets --target x86_64-pc-windows-msvc -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "textlayout" --target x86_64-pc-windows-msvc "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-pc-windows-msvc + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + windows-release-release-gl-textlayout: + runs-on: windows-2019 + # Containers are not supported on Windows. + # container: ghcr.io/pragmatrix/rust-skia-windows:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + shell: bash + + - name: Setup Python 2 + uses: actions/setup-python@v2 + with: + python-version: '2.7.18' + architecture: 'x64' + + - name: Python Version + run: python --version + + - name: Install LLVM + run: choco install llvm + - name: 'Install Rust target x86_64-pc-windows-msvc' + shell: bash + run: | + rustup target add x86_64-pc-windows-msvc + + - name: 'Build all targets in skia-safe for x86_64-pc-windows-msvc with features gl,textlayout' + 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 + 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 + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,textlayout" --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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "gl,textlayout" --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 "gl,textlayout" --all-targets --target x86_64-pc-windows-msvc -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,textlayout" --target x86_64-pc-windows-msvc "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-pc-windows-msvc + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + windows-release-release-vulkan-textlayout: + runs-on: windows-2019 + # Containers are not supported on Windows. + # container: ghcr.io/pragmatrix/rust-skia-windows:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + shell: bash + + - name: Setup Python 2 + uses: actions/setup-python@v2 + with: + python-version: '2.7.18' + architecture: 'x64' + + - name: Python Version + run: python --version + + - name: Install LLVM + run: choco install llvm + - name: 'Install Rust target x86_64-pc-windows-msvc' + shell: bash + run: | + rustup target add x86_64-pc-windows-msvc + + - name: 'Build all targets in skia-safe for x86_64-pc-windows-msvc with features vulkan,textlayout' + 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 + 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 + cargo clean + cargo build -p skia-safe --all-targets --release --features "vulkan,textlayout" --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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "vulkan,textlayout" --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 "vulkan,textlayout" --all-targets --target x86_64-pc-windows-msvc -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "vulkan,textlayout" --target x86_64-pc-windows-msvc "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-pc-windows-msvc + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + windows-release-release-gl-vulkan-textlayout: + runs-on: windows-2019 + # Containers are not supported on Windows. + # container: ghcr.io/pragmatrix/rust-skia-windows:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + shell: bash + + - name: Setup Python 2 + uses: actions/setup-python@v2 + with: + python-version: '2.7.18' + architecture: 'x64' + + - name: Python Version + run: python --version + + - name: Install LLVM + run: choco install llvm + - name: 'Install Rust target x86_64-pc-windows-msvc' + shell: bash + run: | + rustup target add x86_64-pc-windows-msvc + + - name: 'Build all targets in skia-safe for x86_64-pc-windows-msvc with features gl,vulkan,textlayout' + 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 + 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 + cargo clean + cargo build -p skia-safe --all-targets --release --features "gl,vulkan,textlayout" --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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "gl,vulkan,textlayout" --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 "gl,vulkan,textlayout" --all-targets --target x86_64-pc-windows-msvc -- --nocapture + + - name: 'Generate skia-org example images' + shell: bash + if: false + run: | + cargo run --release --features "gl,vulkan,textlayout" --target x86_64-pc-windows-msvc "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-pc-windows-msvc + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + windows-release-release-d3d: + runs-on: windows-2019 + # Containers are not supported on Windows. + # container: ghcr.io/pragmatrix/rust-skia-windows:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + shell: bash + + - name: Setup Python 2 + uses: actions/setup-python@v2 + with: + python-version: '2.7.18' + architecture: 'x64' + + - name: Python Version + run: python --version + + - name: Install LLVM + run: choco install llvm + - name: 'Install Rust target x86_64-pc-windows-msvc' + shell: bash + run: | + rustup target add x86_64-pc-windows-msvc + + - name: 'Build all targets in skia-safe for x86_64-pc-windows-msvc with features d3d' + 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 + 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 + cargo clean + cargo build -p skia-safe --all-targets --release --features "d3d" --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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "d3d" --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" --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" --target x86_64-pc-windows-msvc "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-pc-windows-msvc + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + windows-release-release-d3d-textlayout: + runs-on: windows-2019 + # Containers are not supported on Windows. + # container: ghcr.io/pragmatrix/rust-skia-windows:latest + env: + SKIA_DEBUG: 0 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: stable + + - name: Install Clippy + run: rustup component add clippy + shell: bash + + - name: Setup Python 2 + uses: actions/setup-python@v2 + with: + python-version: '2.7.18' + architecture: 'x64' + + - name: Python Version + run: python --version + + - name: Install LLVM + run: choco install llvm + - name: 'Install Rust target x86_64-pc-windows-msvc' + shell: bash + run: | + rustup target add x86_64-pc-windows-msvc + + - name: 'Build all targets in skia-safe for x86_64-pc-windows-msvc with features d3d,textlayout' + 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 + 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 + cargo clean + cargo build -p skia-safe --all-targets --release --features "d3d,textlayout" --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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + + - name: 'Run Clippy' + shell: bash + if: true + run: | + cargo clippy --release --features "d3d,textlayout" --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,textlayout" --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,textlayout" --target x86_64-pc-windows-msvc "${{ runner.temp }}/skia-org" + + - name: 'Upload skia-org example images' + if: false + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-x86_64-pc-windows-msvc + path: ${{ runner.temp }}/skia-org + + - name: 'Compress binaries' + if: true + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + + - name: 'Release binaries' + if: true + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index d14b69e3d..fbd3e8307 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,8 @@ [workspace] - +resolver = "2" members = [ "skia-bindings", "skia-safe", - "skia-org" + "skia-org", + "mk-workflows" ] diff --git a/Makefile b/Makefile index 20408c544..297b65117 100644 --- a/Makefile +++ b/Makefile @@ -87,3 +87,7 @@ azure-build-win: cd skia-org && cargo test --all ${build-flags-win} --all-targets -- --nocapture cd skia-org && cargo run ${build-flags-win} +.PHONY: workflows +workflows: + cargo run -p mk-workflows + diff --git a/mk-workflows/.gitignore b/mk-workflows/.gitignore new file mode 100644 index 000000000..f34f3554e --- /dev/null +++ b/mk-workflows/.gitignore @@ -0,0 +1,2 @@ +/.github/ + diff --git a/mk-workflows/Cargo.toml b/mk-workflows/Cargo.toml new file mode 100644 index 000000000..01a844dea --- /dev/null +++ b/mk-workflows/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "mk-workflows" +version = "0.1.0" +authors = ["Armin Sander "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/mk-workflows/src/config.rs b/mk-workflows/src/config.rs new file mode 100644 index 000000000..2469c996e --- /dev/null +++ b/mk-workflows/src/config.rs @@ -0,0 +1,169 @@ +use crate::{ + Features, HostOS, Job, Target, Workflow, WorkflowKind, LINUX_JOB, MACOS_JOB, WINDOWS_JOB, +}; + +pub const DEFAULT_ANDROID_API_LEVEL: usize = 26; + +pub fn workflows() -> Vec { + let mut workflows = Vec::new(); + for kind in [WorkflowKind::QA, WorkflowKind::Release] { + workflows.push(Workflow { + kind, + host_os: HostOS::Windows, + host_target: "x86_64-pc-windows-msvc", + job_template: WINDOWS_JOB, + targets: windows_targets(), + host_bin_ext: ".exe", + }); + workflows.push(Workflow { + kind, + host_os: HostOS::Linux, + host_target: "x86_64-unknown-linux-gnu", + job_template: LINUX_JOB, + targets: linux_targets(), + host_bin_ext: "", + }); + workflows.push(Workflow { + kind, + host_os: HostOS::MacOS, + host_target: "x86_64-apple-darwin", + job_template: MACOS_JOB, + targets: macos_targets(), + host_bin_ext: "", + }); + } + workflows +} + +pub fn jobs(workflow: &Workflow) -> Vec { + match workflow.kind { + WorkflowKind::QA => qa_jobs(), + WorkflowKind::Release => release_jobs(workflow), + } +} + +pub fn qa_jobs() -> Vec { + [ + Job { + name: "stable-all-features", + toolchain: "stable", + features: "gl,vulkan,textlayout,webp".into(), + example_args: Some("--driver cpu --driver pdf --driver svg".into()), + ..Job::default() + }, + Job { + name: "stable-all-features-debug", + toolchain: "stable", + features: "gl,vulkan,textlayout,webp".into(), + skia_debug: true, + ..Job::default() + }, + Job { + name: "beta-all-features", + toolchain: "beta", + features: "gl,vulkan,textlayout,webp".into(), + ..Job::default() + }, + ] + .into() +} + +/// Jobs for releasing prebuilt binaries. +pub fn release_jobs(workflow: &Workflow) -> Vec { + let mut jobs: Vec<_> = [ + job("release", ""), + job("release-gl", "gl"), + job("release-vulkan", "vulkan"), + job("release-textlayout", "textlayout"), + job("release-gl-textlayout", "gl,textlayout"), + job("release-vulkan-textlayout", "vulkan,textlayout"), + job("release-gl-vulkan-textlayout", "gl,vulkan,textlayout"), + ] + .into(); + + match workflow.host_os { + HostOS::Windows => { + jobs.push(job("release-d3d", "d3d")); + jobs.push(job("release-d3d-textlayout", "d3d,textlayout")); + } + HostOS::Linux => { + jobs.push(job("release-gl-x11", "gl,x11")); + jobs.push(job("release-gl-textlayout-x11", "gl,textlayout,x11")); + } + HostOS::MacOS => { + jobs.push(job("release-metal", "metal")); + jobs.push(job("release-metal-textlayout", "metal,textlayout")); + } + } + + return jobs; + + fn job(name: &'static str, features: impl Into) -> Job { + Job { + name, + toolchain: "stable", + features: features.into(), + ..Job::default() + } + } +} + +fn windows_targets() -> Vec { + [Target { + target: "x86_64-pc-windows-msvc", + platform_features: "d3d".into(), + ..Target::default() + }] + .into() +} + +fn linux_targets() -> Vec { + let mut targets = vec![Target { + target: "x86_64-unknown-linux-gnu", + platform_features: "egl,x11,wayland".into(), + ..Default::default() + }]; + targets.extend(android_targets()); + targets +} + +fn macos_targets() -> Vec { + vec![ + Target { + target: "x86_64-apple-darwin", + platform_features: "metal".into(), + ..Default::default() + }, + Target { + target: "aarch64-apple-ios", + platform_features: "metal".into(), + ..Default::default() + }, + Target { + target: "x86_64-apple-ios", + platform_features: "metal".into(), + ..Default::default() + }, + ] +} + +fn android_targets() -> Vec { + [ + Target { + target: "aarch64-linux-android", + android_env: true, + ..Default::default() + }, + Target { + target: "x86_64-linux-android", + android_env: true, + ..Default::default() + }, + Target { + target: "i686-linux-android", + android_env: true, + ..Default::default() + }, + ] + .into() +} diff --git a/mk-workflows/src/main.rs b/mk-workflows/src/main.rs new file mode 100644 index 000000000..87542b2c6 --- /dev/null +++ b/mk-workflows/src/main.rs @@ -0,0 +1,259 @@ +//! This program builds the github workflow files for the rust-skia project. +use std::{fmt, fs, iter, ops::Deref, path::PathBuf}; + +mod config; + +const QA_WORKFLOW: &str = include_str!("templates/qa-workflow.yaml"); +const RELEASE_WORKFLOW: &str = include_str!("templates/release-workflow.yaml"); +const LINUX_JOB: &str = include_str!("templates/linux-job.yaml"); +const WINDOWS_JOB: &str = include_str!("templates/windows-job.yaml"); +const MACOS_JOB: &str = include_str!("templates/macos-job.yaml"); +const TARGET_TEMPLATE: &str = include_str!("templates/target.yaml"); + +fn main() { + for workflow in config::workflows() { + build_workflow(&workflow, &config::jobs(&workflow)); + } +} + +#[derive(Clone, Debug)] +pub struct Workflow { + kind: WorkflowKind, + host_os: HostOS, + host_target: &'static str, + job_template: &'static str, + targets: Vec, + host_bin_ext: &'static str, +} + +#[derive(Copy, Clone, PartialEq, Eq, Debug)] +enum WorkflowKind { + QA, + Release, +} + +impl fmt::Display for WorkflowKind { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let n = match self { + WorkflowKind::QA => "qa", + WorkflowKind::Release => "release", + }; + f.write_str(n) + } +} + +#[derive(Copy, Clone, PartialEq, Eq, Debug)] +enum HostOS { + Windows, + Linux, + MacOS, +} + +impl fmt::Display for HostOS { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + use HostOS::*; + f.write_str(match self { + Windows => "windows", + Linux => "linux", + MacOS => "macos", + }) + } +} + +#[derive(Default)] +pub struct Job { + name: &'static str, + toolchain: &'static str, + features: Features, + skia_debug: bool, + // we may need to disable clippy for beta builds temporarily. + disable_clippy: bool, + example_args: Option, +} + +fn build_workflow(workflow: &Workflow, jobs: &[Job]) { + let host_os = workflow.host_os; + let job_template = workflow.job_template; + let targets = &workflow.targets; + + let workflow_name = format!("{}-{}", host_os.to_string(), workflow.kind.to_string()); + let output_filename = PathBuf::new() + .join(".github") + .join("workflows") + .join(format!("{}.yaml", workflow_name)); + + let header = build_header(&workflow_name, workflow.kind); + + let mut parts = vec![header]; + + for job in jobs { + { + let job_name = workflow_name.clone() + "-" + job.name; + let job_name = format!("{}:", job_name).indented(1); + parts.push(job_name); + } + + { + let job_header = build_job(job_template, &job).indented(2); + parts.push(job_header); + } + + let targets: Vec = targets + .iter() + .map(|t| build_target(&workflow, &job, &t).indented(2)) + .collect(); + + parts.extend(targets); + } + + // some parts won't end with \n, so be safe and join them with a newline. + let contents = parts + .iter() + .map(|p| p.trim_end().to_owned()) + .collect::>() + .join("\n"); + + fs::create_dir_all(output_filename.parent().unwrap()).unwrap(); + fs::write(output_filename, contents).unwrap(); +} + +fn build_header(workflow_name: &str, workflow_kind: WorkflowKind) -> String { + let replacements: Vec<_> = [("workflowName".to_owned(), workflow_name.to_owned())].into(); + + let workflow = match workflow_kind { + WorkflowKind::QA => QA_WORKFLOW, + WorkflowKind::Release => RELEASE_WORKFLOW, + }; + + render_template(workflow, &replacements) +} + +fn build_job(template: &str, job: &Job) -> String { + let skia_debug = if job.skia_debug { "1" } else { "0" }; + + let replacements = [ + ("rustToolchain".into(), job.toolchain.into()), + ("skiaDebug".into(), skia_debug.into()), + ]; + render_template(template, &replacements) +} + +fn build_target(workflow: &Workflow, job: &Job, target: &Target) -> String { + let mut features = job.features.clone(); + // if we are releasing binaries, we want the exact set of features specified. + if workflow.kind == WorkflowKind::QA { + features = features.join(&target.platform_features); + } + let native_target = workflow.host_target == target.target; + let example_args = if native_target { + job.example_args.clone() + } else { + None + } + .unwrap_or_default(); + let generate_artifacts = !example_args.is_empty(); + let run_clippy = native_target && !job.disable_clippy; + let release_binaries = workflow.kind == WorkflowKind::Release; + + let template_arguments: &[(&'static str, &dyn fmt::Display)] = &[ + ("target", &target.target), + ("androidEnv", &target.android_env), + ("androidAPILevel", &config::DEFAULT_ANDROID_API_LEVEL), + ("features", &features), + ("runTests", &native_target), + ("runClippy", &run_clippy), + ("exampleArgs", &example_args), + ("generateArtifacts", &generate_artifacts), + ("releaseBinaries", &release_binaries), + ("hostBinExt", &workflow.host_bin_ext), + ]; + + let replacements: Vec<(String, String)> = template_arguments + .iter() + .map(|(name, value)| (name.to_string(), value.to_string())) + .collect(); + + render_template(TARGET_TEMPLATE, &replacements) +} + +fn render_template(template: &str, replacements: &[(String, String)]) -> String { + let mut template = template.to_owned(); + + replacements.iter().for_each(|(pattern, value)| { + template = template.replace(&format!("$[[{}]]", pattern), value) + }); + + if template.contains("$[[") { + panic!( + "Template contains template patterns after replacement: \n{}", + template + ); + } + + template +} + +#[derive(Clone, Default, Debug)] +struct Target { + target: &'static str, + android_env: bool, + platform_features: Features, +} + +#[derive(Clone, Default, Debug)] +struct Features(Vec); + +impl Features { + pub fn join(&self, other: &Self) -> Self { + let mut features = self.0.clone(); + features.extend(other.0.iter().cloned()); + features.sort(); + features.dedup(); + Self(features) + } +} + +impl Deref for Features { + type Target = Vec; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl fmt::Display for Features { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> std::fmt::Result { + let features = self.0.join(","); + f.write_str(&features) + } +} + +impl From<&str> for Features { + fn from(s: &str) -> Self { + let strs: Vec = s + .split(',') + .filter_map(|s| { + let f = s.trim().to_owned(); + if !f.is_empty() { + Some(f) + } else { + None + } + }) + .collect(); + Features(strs) + } +} + +trait Indented { + fn indented(&self, i: usize) -> Self; +} + +impl Indented for String { + fn indented(&self, i: usize) -> String { + let prefix: String = iter::repeat(" ").take(i).collect(); + let indented_lines: Vec = self.lines().map(|l| prefix.clone() + l).collect(); + + indented_lines.join("\n") + } +} diff --git a/mk-workflows/src/templates/linux-job.yaml b/mk-workflows/src/templates/linux-job.yaml new file mode 100644 index 000000000..dc6529940 --- /dev/null +++ b/mk-workflows/src/templates/linux-job.yaml @@ -0,0 +1,21 @@ +runs-on: ubuntu-20.04 +container: ghcr.io/pragmatrix/rust-skia-linux:latest +env: + SKIA_DEBUG: $[[skiaDebug]] + +steps: +- uses: actions/checkout@v2 + with: + submodules: true + +- name: Prepare Rustup + run: (cd /github/home && ln -s /root/.cargo) + +- name: Update Rustup and Rust + run: rustup update + +- name: Configure Rust Toolchain + run: rustup default $[[rustToolchain]] + +- name: Install Clippy + run: rustup component add clippy diff --git a/mk-workflows/src/templates/macos-job.yaml b/mk-workflows/src/templates/macos-job.yaml new file mode 100644 index 000000000..ca6804b05 --- /dev/null +++ b/mk-workflows/src/templates/macos-job.yaml @@ -0,0 +1,20 @@ +runs-on: macOS-10.15 +env: + SKIA_DEBUG: $[[skiaDebug]] + +steps: +- uses: actions/checkout@v2 + with: + submodules: true + +- name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: $[[rustToolchain]] + +- name: Install Clippy + run: rustup component add clippy + +# remove LLVM on macOS so that only Apple's clang is used +- name: Remove LLVM (macOS) + run: brew uninstall llvm diff --git a/mk-workflows/src/templates/qa-workflow.yaml b/mk-workflows/src/templates/qa-workflow.yaml new file mode 100644 index 000000000..1cba307b6 --- /dev/null +++ b/mk-workflows/src/templates/qa-workflow.yaml @@ -0,0 +1,15 @@ +# Generated by mk-workflows. + +name: '$[[workflowName]]' +on: + push: + branches-ignore: + - release + schedule: + - cron: '0 0 * * *' + +concurrency: + group: '$[[workflowName]]-${{ github.ref }}' + cancel-in-progress: true + +jobs: diff --git a/mk-workflows/src/templates/release-workflow.yaml b/mk-workflows/src/templates/release-workflow.yaml new file mode 100644 index 000000000..f5e743994 --- /dev/null +++ b/mk-workflows/src/templates/release-workflow.yaml @@ -0,0 +1,13 @@ +# Generated by mk-workflows. + +name: '$[[workflowName]]' +on: + push: + branches: + - release + +concurrency: + group: '$[[workflowName]]-${{ github.ref }}' + cancel-in-progress: true + +jobs: diff --git a/mk-workflows/src/templates/target.yaml b/mk-workflows/src/templates/target.yaml new file mode 100644 index 000000000..4c741e7f6 --- /dev/null +++ b/mk-workflows/src/templates/target.yaml @@ -0,0 +1,71 @@ +- name: 'Install Rust target $[[target]]' + shell: bash + run: | + rustup target add $[[target]] + +- name: 'Build all targets in skia-safe for $[[target]] with features $[[features]]' + shell: bash + run: | + if [ "$[[androidEnv]]" == "true" ]; then + TARGET=$[[target]] + TARGET=${TARGET//-/_} + export CC_${TARGET}=$[[target]]$[[androidAPILevel]]-clang$[[hostBinExt]] + export CXX_${TARGET}=$[[target]]$[[androidAPILevel]]-clang++$[[hostBinExt]] + TARGET_UPPERCASE=`echo "${TARGET}" | tr [a-z] [A-Z]` + export CARGO_TARGET_${TARGET_UPPERCASE}_LINKER=$[[target]]$[[androidAPILevel]]-clang$[[hostBinExt]] + echo "Set CC, CXX, and CARGO_LINKER target specific environment variables for Android" + fi + cargo clean + cargo build -p skia-safe --all-targets --release --features "$[[features]]" --target $[[target]] + 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_BINARIES_PATH=${BUILD_ARTIFACTSTAGINGDIRECTORY}" >> ${GITHUB_ENV} + env: + BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ runner.temp }} + +- name: 'Run Clippy' + shell: bash + if: $[[runClippy]] + run: | + cargo clippy --release --features "$[[features]]" --all-targets --target $[[target]] -- -D warnings + +- name: 'Test all workspace projects' + shell: bash + if: $[[runTests]] + run: | + cargo test --all --release --features "$[[features]]" --all-targets --target $[[target]] -- --nocapture + +- name: 'Generate skia-org example images' + shell: bash + if: $[[generateArtifacts]] + run: | + cargo run --release --features "$[[features]]" --target $[[target]] "${{ runner.temp }}/skia-org" $[[exampleArgs]] + +- name: 'Upload skia-org example images' + if: $[[generateArtifacts]] + uses: actions/upload-artifact@v2 + with: + name: skia-org-images-$[[target]] + path: ${{ runner.temp }}/skia-org + +- name: 'Compress binaries' + if: $[[releaseBinaries]] + uses: master-atul/tar-action@v1.0.2 + with: + command: c + cwd: '${{ env.SKIA_BINARIES_PATH }}' + files: 'skia-binaries' + outPath: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + +- name: 'Release binaries' + if: $[[releaseBinaries]] + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + replacesArtifacts: true + commit: release + tag: '${{ env.SKIA_BINARIES_TAG }}' + artifacts: '${{ runner.temp }}/skia-binaries-${{ env.SKIA_BINARIES_KEY }}.tar.gz' + artifactErrorsFailBuild: true + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true diff --git a/mk-workflows/src/templates/windows-job.yaml b/mk-workflows/src/templates/windows-job.yaml new file mode 100644 index 000000000..d91192088 --- /dev/null +++ b/mk-workflows/src/templates/windows-job.yaml @@ -0,0 +1,31 @@ +runs-on: windows-2019 +# Containers are not supported on Windows. +# container: ghcr.io/pragmatrix/rust-skia-windows:latest +env: + SKIA_DEBUG: $[[skiaDebug]] + +steps: +- uses: actions/checkout@v2 + with: + submodules: true + +- name: Install Rust + uses: hecrj/setup-rust-action@master + with: + rust-version: $[[rustToolchain]] + +- name: Install Clippy + run: rustup component add clippy + shell: bash + +- name: Setup Python 2 + uses: actions/setup-python@v2 + with: + python-version: '2.7.18' + architecture: 'x64' + +- name: Python Version + run: python --version + +- name: Install LLVM + run: choco install llvm diff --git a/skia-bindings/build_support/skia.rs b/skia-bindings/build_support/skia.rs index 63d987bfd..8aa7022ce 100644 --- a/skia-bindings/build_support/skia.rs +++ b/skia-bindings/build_support/skia.rs @@ -733,6 +733,9 @@ fn generate_bindings(build: &FinalBuildConfiguration, output_directory: &Path) { .size_t_is_usize(true) .parse_callbacks(Box::new(ParseCallbacks)) .raw_line("#![allow(clippy::all)]") + // https://github.com/rust-lang/rust-bindgen/issues/1651 + .raw_line("#![allow(unknown_lints)]") + .raw_line("#![allow(deref_nullptr)]") // GrVkBackendContext contains u128 fields on macOS .raw_line("#![allow(improper_ctypes)]") .allowlist_function("C_.*") diff --git a/skia-org/Cargo.toml b/skia-org/Cargo.toml index b44d56aa7..3c085d6b9 100644 --- a/skia-org/Cargo.toml +++ b/skia-org/Cargo.toml @@ -15,6 +15,8 @@ version = "1.0.0" authors = ["Armin Sander "] edition = "2018" +default-run = "skia-org" + [features] default = [] gl = ["offscreen_gl_context", "sparkle", "skia-safe/gl"] diff --git a/skia-safe/src/core/surface_props.rs b/skia-safe/src/core/surface_props.rs index 0ca88cf33..6a25e2b62 100644 --- a/skia-safe/src/core/surface_props.rs +++ b/skia-safe/src/core/surface_props.rs @@ -128,5 +128,5 @@ fn create() { props.flags() ); assert_eq!(PixelGeometry::RGBH, props.pixel_geometry()); - assert_eq!(true, props.is_use_device_independent_fonts()); + assert!(props.is_use_device_independent_fonts()); }