But don't fail, since most packages are missing the checksums still. Once we have rebuilt everything in base we can treat errors there as fatal. This shows us what is missing still..
182 lines
5.7 KiB
YAML
182 lines
5.7 KiB
YAML
name: 'build'
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 3 * * *'
|
|
|
|
concurrency: nope
|
|
|
|
jobs:
|
|
build-installer:
|
|
runs-on: windows-2022
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: setup-msys2
|
|
uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MSYS
|
|
update: true
|
|
install: p7zip tar mingw-w64-x86_64-qt-installer-framework
|
|
|
|
- name: Switch to the main mirror
|
|
shell: msys2 {0}
|
|
run: |
|
|
echo 'Server = https://repo.msys2.org/mingw/$repo/' > /etc/pacman.d/mirrorlist.mingw
|
|
echo 'Server = https://repo.msys2.org/msys/$arch/' > /etc/pacman.d/mirrorlist.msys
|
|
pacman-conf.exe
|
|
|
|
- name: Update using the main mirror & Check install
|
|
run: |
|
|
msys2 -c 'pacman --noconfirm -Suuy'
|
|
msys2 -c 'pacman --noconfirm -Suu'
|
|
msys2 -c 'pacman -Qkq'
|
|
|
|
- name: Build Installer
|
|
shell: msys2 {0}
|
|
run: |
|
|
bash make-msys2-installer
|
|
|
|
- name: Create 'latest' Variants and Checksums
|
|
run: |
|
|
mv msys2-base-x86_64-[0-9]*.sfx.exe msys2-base-x86_64-latest.sfx.exe
|
|
mv msys2-x86_64-[0-9]*.exe msys2-x86_64-latest.exe
|
|
mv msys2-*.tar.xz msys2-base-x86_64-latest.tar.xz
|
|
sha256sum.exe msys2-*
|
|
sha256sum.exe msys2-* > msys2-checksums.txt
|
|
|
|
- name: Upload Results
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: installer
|
|
path: msys2-*
|
|
|
|
test-installer:
|
|
name: installer-${{ matrix.image }}
|
|
runs-on: windows-${{ matrix.image }}
|
|
needs: build-installer
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
image: [2019, 2022]
|
|
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 without Login Shell
|
|
run: |
|
|
C:\msys2-install-test\usr\bin\pacman.exe -Syy
|
|
C:\msys2-install-test\usr\bin\pacman.exe --noconfirm -S vim
|
|
|
|
- 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"
|
|
C:\msys2-install-test\usr\bin\bash.exe -lc "pacman --noconfirm -S git"
|
|
|
|
- name: Uninstall
|
|
run: |
|
|
C:\msys2-install-test\uninstall.exe pr --confirm-command
|
|
|
|
test-docker-sfx:
|
|
name: docker-sfx-${{ matrix.image }}
|
|
runs-on: windows-${{ matrix.image }}
|
|
needs: build-installer
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
image: [2019, 2022]
|
|
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.${{ matrix.image }} .
|
|
|
|
- name: Test without Login Shell
|
|
run: |
|
|
docker run msys2-base C:\msys64\usr\bin\pacman.exe -Syy
|
|
docker run msys2-base C:\msys64\usr\bin\pacman.exe --noconfirm -S vim
|
|
|
|
- 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 -Qkk || true"
|
|
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -Syy"
|
|
docker run msys2-base C:\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm git"
|
|
|
|
test-sfx:
|
|
name: sfx-${{ matrix.image }}
|
|
runs-on: windows-${{ matrix.image }}
|
|
needs: build-installer
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
image: [2019, 2022]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: installer
|
|
|
|
- name: Install
|
|
run: |
|
|
./msys2-base-x86_64-latest.sfx.exe -y -oC:/msys2-install-test
|
|
|
|
- name: Test without Login Shell
|
|
run: |
|
|
$env:Path = 'C:\msys2-install-test\msys64\usr\bin;' + $env:Path
|
|
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman-key --init"
|
|
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman-key --populate"
|
|
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman -Syy"
|
|
C:\msys2-install-test\msys64\usr\bin\bash.exe -c "pacman --noconfirm -S vim"
|
|
|
|
- name: Test
|
|
run: |
|
|
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman --version"
|
|
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -Qkv"
|
|
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -Qkk || true"
|
|
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -Syy"
|
|
C:\msys2-install-test\msys64\usr\bin\bash.exe -lc "pacman -S --noconfirm git"
|
|
|
|
upload-nightly:
|
|
permissions:
|
|
contents: write
|
|
needs:
|
|
- test-docker-sfx
|
|
- test-installer
|
|
- test-sfx
|
|
if: github.ref == 'refs/heads/master'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: installer
|
|
|
|
- name: Upload Installers
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
gh release upload nightly-x86_64 msys2-* --clobber -R ${{ github.repository }}
|