diff options
author | Josh Matthews <josh@joshmatthews.net> | 2021-05-29 14:41:13 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2021-05-29 16:05:02 -0400 |
commit | 172274d484c363cdf4630b4001ec2c0087f77765 (patch) | |
tree | 02b3b36a55c503631252a857f9925ec7ffbd6fc0 | |
parent | 88843b289dacb5ba5a08466c34de3ece1de829c5 (diff) | |
download | servo-172274d484c363cdf4630b4001ec2c0087f77765.tar.gz servo-172274d484c363cdf4630b4001ec2c0087f77765.zip |
Add UWP builds to github actions.
-rw-r--r-- | .github/workflows/main.yml | 50 | ||||
-rw-r--r-- | .github/workflows/nightly.yml | 31 | ||||
-rw-r--r-- | etc/ci/generate_workflow.py | 1 | ||||
-rw-r--r-- | etc/ci/workflow.mako | 50 | ||||
-rw-r--r-- | python/servo/package_commands.py | 5 |
5 files changed, 137 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5038bded114..75bc774dba6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,6 +37,54 @@ jobs: working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}" run: python mach smoketest --angle + build-uwp-x64: + name: Build (Windows UWP x64) + runs-on: windows-2019 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 2 + - name: Copy to C drive + run: cp D:\a C:\ -Recurse + - name: Bootstrap + working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}" + run: | + python -m pip install --upgrade pip virtualenv + python mach fetch + - name: Release build + working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}" + run: python mach build --release --target=x86_64-uwp-windows-msvc + - name: Package + working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}" + run: python mach package --release --target=x86_64-uwp-windows-msvc --uwp=x64 + #env: + # CODESIGN_CERT: {'${{ secrets.WINDOWS_CODESIGN_CERT }}'} + - name: Tidy + run: python mach test-tidy --force-cpp --no-wpt + + build-uwp-arm64: + name: Build (Windows UWP arm64) + runs-on: windows-2019 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 2 + - name: Copy to C drive + run: cp D:\a C:\ -Recurse + - name: Bootstrap + working-directory: "C:\\a\\servo\\servo" + run: | + python -m pip install --upgrade pip virtualenv + python mach fetch + - name: Release build + working-directory: "C:\\a\\servo\\servo" + run: python mach build --release --target=aarch64-uwp-windows-msvc + - name: Package + working-directory: "C:\\a\\servo\\servo" + run: python mach package --release --target=aarch64-uwp-windows-msvc --uwp=arm64 + #env: + # CODESIGN_CERT: {'${{ secrets.WINDOWS_CODESIGN_CERT }}'} + build-mac: name: Build (macOS) runs-on: macos-10.15 @@ -1604,6 +1652,8 @@ jobs: runs-on: ubuntu-latest needs: - "build-win" + - "build-uwp-x64" + - "build-uwp-arm64" - "build-linux" - "build-mac" - "linux-wpt-1" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 55f6caed80a..6a90f76c265 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -102,3 +102,34 @@ jobs: run: python mach upload-nightly windows-msvc --secret-from-environment env: S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }} + + upload-uwp: + name: Upload nightly (UWP) + runs-on: windows-2019 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 2 + - name: Copy to C drive + run: cp D:\a C:\ -Recurse + - name: Bootstrap + working-directory: "C:\\a\\servo\\servo" + run: | + python -m pip install --upgrade pip virtualenv + python mach fetch + - name: Release build (x64) + working-directory: "C:\\a\\servo\\servo" + run: python mach build --release --target=x86_64-uwp-windows-msvc + - name: Release build (arm64) + working-directory: "C:\\a\\servo\\servo" + run: python mach build --release --target=aarch64-uwp-windows-msvc + - name: Package + working-directory: "C:\\a\\servo\\servo" + run: python mach package --release --target=x86_64-uwp-windows-msvc --uwp=x64 --uwp=arm64 + #env: + # CODESIGN_CERT: ${{ secrets.WINDOWS_CODESIGN_CERT }} + - name: Upload + working-directory: "C:\\a\\servo\\servo" + run: python mach upload-nightly uwp --secret-from-environment + env: + S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }} diff --git a/etc/ci/generate_workflow.py b/etc/ci/generate_workflow.py index 92bb0e7faaa..a3295e1c0a2 100644 --- a/etc/ci/generate_workflow.py +++ b/etc/ci/generate_workflow.py @@ -50,6 +50,7 @@ def main(): 'workflow.mako', total_chunks=20, REPOSITORY_NAME="${{ github.event.repository.name }}", + CODESIGN_CERT="${{ secrets.WINDOWS_CODESIGN_CERT }}", )) diff --git a/etc/ci/workflow.mako b/etc/ci/workflow.mako index 650df49c131..597b4d66c27 100644 --- a/etc/ci/workflow.mako +++ b/etc/ci/workflow.mako @@ -37,6 +37,54 @@ jobs: working-directory: "C:\\a\\${ REPOSITORY_NAME }\\${ REPOSITORY_NAME }" run: python mach smoketest --angle + build-uwp-x64: + name: Build (Windows UWP x64) + runs-on: windows-2019 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 2 + - name: Copy to C drive + run: cp D:\a C:\ -Recurse + - name: Bootstrap + working-directory: "C:\\a\\${ REPOSITORY_NAME }\\${ REPOSITORY_NAME }" + run: | + python -m pip install --upgrade pip virtualenv + python mach fetch + - name: Release build + working-directory: "C:\\a\\${ REPOSITORY_NAME }\\${ REPOSITORY_NAME }" + run: python mach build --release --target=x86_64-uwp-windows-msvc + - name: Package + working-directory: "C:\\a\\${ REPOSITORY_NAME }\\${ REPOSITORY_NAME }" + run: python mach package --release --target=x86_64-uwp-windows-msvc --uwp=x64 + #env: + # CODESIGN_CERT: ${{ CODESIGN_CERT }} + - name: Tidy + run: python mach test-tidy --force-cpp --no-wpt + + build-uwp-arm64: + name: Build (Windows UWP arm64) + runs-on: windows-2019 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 2 + - name: Copy to C drive + run: cp D:\a C:\ -Recurse + - name: Bootstrap + working-directory: "C:\\a\\servo\\servo" + run: | + python -m pip install --upgrade pip virtualenv + python mach fetch + - name: Release build + working-directory: "C:\\a\\servo\\servo" + run: python mach build --release --target=aarch64-uwp-windows-msvc + - name: Package + working-directory: "C:\\a\\servo\\servo" + run: python mach package --release --target=aarch64-uwp-windows-msvc --uwp=arm64 + #env: + # CODESIGN_CERT: ${{ CODESIGN_CERT }} + build-mac: name: Build (macOS) runs-on: macos-10.15 @@ -183,6 +231,8 @@ jobs: runs-on: ubuntu-latest needs: - "build-win" + - "build-uwp-x64" + - "build-uwp-arm64" - "build-linux" - "build-mac" % for chunk in range(1, total_chunks + 1): diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py index 280fe782481..886b52b20f6 100644 --- a/python/servo/package_commands.py +++ b/python/servo/package_commands.py @@ -791,9 +791,14 @@ def setup_uwp_signing(ms_app_store, publisher): print("ERROR: PowerShell command failed: ", cmd) exit(1) + pfx = None if is_tc: print("Packaging on TC. Using secret certificate") pfx = get_taskcluster_secret("windows-codesign-cert/latest")["pfx"] + elif 'CODESIGN_CERT' in os.environ: + pfx = os.environ['CODESIGN_CERT'] + + if pfx: open("servo.pfx", "wb").write(base64.b64decode(pfx["base64"])) run_powershell_cmd('Import-PfxCertificate -FilePath .\\servo.pfx -CertStoreLocation Cert:\\CurrentUser\\My') os.remove("servo.pfx") |