name: Windows workflow on: workflow_call: inputs: layout: required: true type: string unit-tests: required: false default: false type: boolean upload: required: false default: false type: boolean github-release-id: required: false type: string workflow_dispatch: inputs: layout: required: true type: choice options: ["2013", "2020"] unit-tests: required: false default: false type: boolean upload: required: false default: false type: boolean push: branches: ["try-windows"] env: RUST_BACKTRACE: 1 SHELL: /bin/bash LAYOUT: "${{ contains(inputs.layout, '2020') && 'layout-2020' || 'layout-2013' }}" PACKAGE: "${{ contains(inputs.layout, '2020') && 'windows-msvc-layout2020' || 'windows-msvc' }}" CCACHE: "ccache" CARGO_TARGET_DIR: C:\\a\\servo\\servo\\target jobs: build-win: name: Build runs-on: windows-2019 steps: - uses: actions/checkout@v3 with: fetch-depth: 2 - name: wix311-binaries shell: powershell run: | Start-BitsTransfer -Source https://github.com/wixtoolset/wix3/releases/download/wix3111rtm/wix311-binaries.zip -Destination C:\\wix311-binaries.zip Expand-Archive C:\\wix311-binaries.zip -DestinationPath C:\\wix echo "C:\\wix" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - name: ccache uses: hendrikmuhs/ccache-action@v1.2 - name: Bootstrap run: | python -m pip install --upgrade pip virtualenv python mach fetch python mach bootstrap-gstreamer - name: Release build run: python mach build --release --with-${{ env.LAYOUT }} - name: Copy resources run: cp D:\a\servo\servo\resources C:\a\servo\servo -Recurse - name: Smoketest run: python mach smoketest --angle - name: Unit tests if: ${{ inputs.unit-tests }} run: python mach test-unit --release --with-${{ env.LAYOUT }} - name: Package run: python mach package --release - name: Upload Package uses: actions/upload-artifact@v3 with: name: ${{ env.PACKAGE }} # These files are available # MSI Installer: C:\a\servo\servo\target\release\msi\Installer.msi # Bundle: C:\a\servo\servo\target\release\msi\Servo.exe # Zip: C:\a\servo\servo\target\release\msi\Servo.zip path: C:\\a\\servo\\servo\\target/release/msi/Servo.exe - name: Upload if: ${{ inputs.upload }} run: | python mach upload-nightly ${{ env.PACKAGE }} --secret-from-environment ` --github-release-id ${{ inputs.github-release-id }} env: S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }} NIGHTLY_REPO_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }} NIGHTLY_REPO: ${{ github.repository_owner }}/servo-nightly-builds build_result: name: homu build finished runs-on: ubuntu-latest if: always() # needs all build to detect cancellation needs: - "build-win" steps: - name: Mark the job as successful run: exit 0 if: ${{ !contains(join(needs.*.result, ','), 'failure') && !contains(join(needs.*.result, ','), 'cancelled') }} - name: Mark the job as unsuccessful run: exit 1 if: contains(join(needs.*.result, ','), 'failure') || contains(join(needs.*.result, ','), 'cancelled')