Skip to content

Commit

Permalink
Move artifact build to QA-azure
Browse files Browse the repository at this point in the history
This is necessary in order to set a dependency relationship.
They still run on Github runners.
  • Loading branch information
EduardGomezEscandell committed Sep 22, 2023
1 parent a05ec9b commit 3ca117c
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 67 deletions.
69 changes: 68 additions & 1 deletion .github/workflows/qa-azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,73 @@ env:
az_resource_group: wsl

jobs:

build-wsl-pro-service:
name: Build wsl-pro-service debian package
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Build debian package
uses: canonical/desktop-engineering/gh-actions/common/build-debian@main
with:
source-dir: wsl-pro-service
token: ${{ secrets.GITHUB_TOKEN }}
docker-image: ubuntu:devel
env:
UP4W_SKIP_INTERNAL_DEPENDENCY_UPDATE: "1"

build-ubuntu-pro-for-windows:
name: Build Windows Agent Appx
runs-on: windows-latest
steps:
- name: Set up git
uses: canonical/ubuntu-pro-for-windows/.github/actions/setup-git@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check out repository
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.work
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ env.flutter-version }}
- name: Setup MSBuild (PATH)
uses: microsoft/[email protected]
- name: Install certificate
shell: powershell
run: |
New-Item -ItemType directory -Path certificate
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.CERTIFICATE }}'
certutil -decode certificate\certificate.txt certificate\certificate.pfx
$pwd = ConvertTo-SecureString '${{ secrets.CERTIFICATE_PASSWORD }}' -AsPlainText -Force
Import-PfxCertificate -Password $pwd -CertStoreLocation Cert:LocalMachine\Trust -FilePath certificate\certificate.pfx
Import-PfxCertificate -Password $pwd -CertStoreLocation Cert:CurrentUser\My -FilePath certificate\certificate.pfx
- name: Build Bundle
run: |
msbuild `
.\msix\msix.sln `
-target:Build `
-maxCpuCount `
-nodeReuse:false `
-property:Configuration=Release `
-property:AppxBundle=Always `
-property:AppxBundlePlatforms=x64 `
-property:UapAppxPackageBuildMode=SideloadOnly `
-property:Version=0.0.1+${{ github.sha }} `
-nologo `
-verbosity:normal
- name: Upload sideload artifact
uses: actions/upload-artifact@v3
with:
name: UbuntuProForWindows+${{ github.sha }}
path: |
msix/UbuntuProForWindows/AppPackages/UbuntuProForWindows_*/UbuntuProForWindows_1.0.0.0_x64.cer
msix/UbuntuProForWindows/AppPackages/UbuntuProForWindows_*/UbuntuProForWindows_1.0.0.0_x64.msixbundle
vm-setup:
name: Set up Azure VM
runs-on: ubuntu-latest
Expand All @@ -30,7 +97,7 @@ jobs:
qa:
name: Run end-to-end tests on the Azure VM
runs-on: [self-hosted, Windows]
needs: vm-setup
needs: [vm-setup, build-wsl-pro-service, build-ubuntu-pro-for-windows]
steps:
- name: Set up git
uses: canonical/ubuntu-pro-for-windows/.github/actions/setup-git@main
Expand Down
66 changes: 0 additions & 66 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,69 +256,3 @@ jobs:
uses: ./.github/actions/check-diff
with:
files-to-validate: '${{ matrix.subproject }}/{.,**}/*.{dart,go}'

build-wsl-pro-service:
name: Build wsl-pro-service debian package
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Build debian package
uses: canonical/desktop-engineering/gh-actions/common/build-debian@main
with:
source-dir: wsl-pro-service
token: ${{ secrets.GITHUB_TOKEN }}
docker-image: ubuntu:devel
env:
UP4W_SKIP_INTERNAL_DEPENDENCY_UPDATE: "1"

build-ubuntu-pro-for-windows:
name: Build Windows Agent Appx
runs-on: windows-latest
steps:
- name: Set up git
uses: canonical/ubuntu-pro-for-windows/.github/actions/setup-git@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check out repository
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.work
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ env.flutter-version }}
- name: Setup MSBuild (PATH)
uses: microsoft/[email protected]
- name: Install certificate
shell: powershell
run: |
New-Item -ItemType directory -Path certificate
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.CERTIFICATE }}'
certutil -decode certificate\certificate.txt certificate\certificate.pfx
$pwd = ConvertTo-SecureString '${{ secrets.CERTIFICATE_PASSWORD }}' -AsPlainText -Force
Import-PfxCertificate -Password $pwd -CertStoreLocation Cert:LocalMachine\Trust -FilePath certificate\certificate.pfx
Import-PfxCertificate -Password $pwd -CertStoreLocation Cert:CurrentUser\My -FilePath certificate\certificate.pfx
- name: Build Bundle
run: |
msbuild `
.\msix\msix.sln `
-target:Build `
-maxCpuCount `
-nodeReuse:false `
-property:Configuration=Release `
-property:AppxBundle=Always `
-property:AppxBundlePlatforms=x64 `
-property:UapAppxPackageBuildMode=SideloadOnly `
-property:Version=0.0.1+${{ github.sha }} `
-nologo `
-verbosity:normal
- name: Upload sideload artifact
uses: actions/upload-artifact@v3
with:
name: UbuntuProForWindows+${{ github.sha }}
path: |
msix/UbuntuProForWindows/AppPackages/UbuntuProForWindows_*/UbuntuProForWindows_1.0.0.0_x64.cer
msix/UbuntuProForWindows/AppPackages/UbuntuProForWindows_*/UbuntuProForWindows_1.0.0.0_x64.msixbundle

0 comments on commit 3ca117c

Please sign in to comment.