Run some tests on the produced installers before uploading
Install on both server 2016 and 2019, using the qt installer and the sfx inside docker This makes the nightly builds safer to use, since they are likely never completely broken. Fixes #27
This commit is contained in:
13
.ci/Dockerfile.2016
Normal file
13
.ci/Dockerfile.2016
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM mcr.microsoft.com/windows/servercore:ltsc2016
|
||||
|
||||
COPY ./msys2-base-x86_64-latest.sfx.exe /msys2.exe
|
||||
|
||||
RUN powershell -Command \
|
||||
$ErrorActionPreference = 'Stop'; \
|
||||
$ProgressPreference = 'SilentlyContinue'; \
|
||||
/msys2.exe -y -oC:\; \
|
||||
function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
|
||||
msys ' '; \
|
||||
msys 'pacman --noconfirm -Syuu'; \
|
||||
msys 'pacman --noconfirm -Syuu'; \
|
||||
msys 'pacman --noconfirm -Scc';
|
||||
@@ -1,12 +1,11 @@
|
||||
FROM mcr.microsoft.com/windows/servercore:ltsc2019
|
||||
|
||||
COPY ./msys2-base-x86_64-latest.sfx.exe /msys2.exe
|
||||
|
||||
RUN powershell -Command \
|
||||
$ErrorActionPreference = 'Stop'; \
|
||||
$ProgressPreference = 'SilentlyContinue'; \
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
|
||||
Invoke-WebRequest -UseBasicParsing -uri "https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe" -OutFile msys2.exe; \
|
||||
.\msys2.exe -y -oC:\; \
|
||||
Remove-Item msys2.exe ; \
|
||||
/msys2.exe -y -oC:\; \
|
||||
function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
|
||||
msys ' '; \
|
||||
msys 'pacman --noconfirm -Syuu'; \
|
||||
127
.github/workflows/build.yml
vendored
127
.github/workflows/build.yml
vendored
@@ -42,16 +42,119 @@ jobs:
|
||||
sha256sum.exe msys2-*
|
||||
sha256sum.exe msys2-* > msys2-checksums.txt
|
||||
|
||||
- name: Create 'latest' Variants
|
||||
run: |
|
||||
cp msys2-base-x86_64-[0-9]*.sfx.exe msys2-base-x86_64-latest.sfx.exe
|
||||
cp msys2-x86_64-[0-9]*.exe msys2-x86_64-latest.exe
|
||||
cp msys2-*.tar.xz msys2-base-x86_64-latest.tar.xz
|
||||
|
||||
- name: Upload Results
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: installer
|
||||
path: msys2-*
|
||||
|
||||
test-installer-2019:
|
||||
needs: build-installer
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: installer
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
./msys2-x86_64-latest.exe in --confirm-command --accept-messages --root C:/msys2-install-test
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman --version"
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman -Qkv"
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman -Syy"
|
||||
|
||||
- name: Uninstall
|
||||
run: |
|
||||
C:\msys2-install-test\uninstall.exe pr --confirm-command
|
||||
|
||||
test-installer-2016:
|
||||
needs: build-installer
|
||||
runs-on: windows-2016
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: installer
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
./msys2-x86_64-latest.exe in --confirm-command --accept-messages --root C:/msys2-install-test
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman --version"
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman -Qkv"
|
||||
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman -Syy"
|
||||
|
||||
- name: Uninstall
|
||||
run: |
|
||||
C:\msys2-install-test\uninstall.exe pr --confirm-command
|
||||
|
||||
test-docker-sfx-2019:
|
||||
needs: build-installer
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: installer
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build -t msys2-base -f ./.ci/Dockerfile.2019 .
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman --version"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Qkv"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Syy"
|
||||
|
||||
test-docker-sfx-2016:
|
||||
needs: build-installer
|
||||
runs-on: windows-2016
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: installer
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build -t msys2-base -f ./.ci/Dockerfile.2016 .
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman --version"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Qkv"
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Syy"
|
||||
|
||||
upload-nightly:
|
||||
permissions:
|
||||
contents: write
|
||||
needs: build-installer
|
||||
needs:
|
||||
- build-installer
|
||||
- test-docker-sfx-2019
|
||||
- test-docker-sfx-2016
|
||||
- test-installer-2016
|
||||
- test-installer-2019
|
||||
if: github.ref == 'refs/heads/master'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -59,31 +162,9 @@ jobs:
|
||||
with:
|
||||
name: installer
|
||||
|
||||
- name: Create 'latest' Variants
|
||||
run: |
|
||||
cp msys2-base-x86_64-[0-9]*.sfx.exe msys2-base-x86_64-latest.sfx.exe
|
||||
cp msys2-x86_64-[0-9]*.exe msys2-x86_64-latest.exe
|
||||
cp msys2-*.tar.xz msys2-base-x86_64-latest.tar.xz
|
||||
|
||||
- uses: eine/tip@master
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: nightly-x86_64
|
||||
rm: true
|
||||
files: msys2-*
|
||||
|
||||
build-docker:
|
||||
needs: upload-nightly
|
||||
if: github.ref == 'refs/heads/master'
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
Get-Content Dockerfile | docker build -t msys2-base -
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman --version"
|
||||
|
||||
Reference in New Issue
Block a user