Skip to content

Commit

Permalink
build all images in one run.
Browse files Browse the repository at this point in the history
  • Loading branch information
Readon committed Oct 30, 2023
1 parent 290274f commit 9d41ff2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 82 deletions.
87 changes: 9 additions & 78 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ concurrency: nope
jobs:
build-installer:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
scalaVersion: [2.11, 2.12, 2.13]
spinalVersion: [1.6.4, 1.8.2, 1.9.3]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -45,13 +50,10 @@ jobs:
- name: Build Installer
shell: msys2 {0}
run: |
bash make-msys2-installer ${{ github.ref }}
bash make-msys2-installer ${{ matrix.scalaVersion }} ${{ matrix.spinalVersion }}
- 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
Expand All @@ -69,6 +71,8 @@ jobs:
fail-fast: false
matrix:
image: [2019, 2022]
scalaVersion: [2.11, 2.12, 2.13]
spinalVersion: [1.6.4, 1.8.2, 1.9.3]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -79,7 +83,7 @@ jobs:

- name: Install
run: |
./msys2-x86_64-latest.exe in --confirm-command --accept-messages --root C:/msys2-install-test
./msys2-x86_64-${{ matrix.scalaVersion }}-${{ matrix.spinalVersion }}.exe in --confirm-command --accept-messages --root C:/msys2-install-test
- name: Test without Login Shell
run: |
Expand All @@ -97,84 +101,11 @@ jobs:
run: |
C:\msys2-install-test\uninstall.exe pr --confirm-command
test-docker-sfx:
name: docker-sfx-${{ matrix.image }}
runs-on: windows-${{ matrix.image }}
if: false
needs: build-installer
strategy:
fail-fast: false
matrix:
image: [2019, 2022]
steps:
- name: Checkout code
uses: actions/checkout@v3

- uses: actions/download-artifact@v3
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 }}
if: false
needs: build-installer
strategy:
fail-fast: false
matrix:
image: [2019, 2022]
steps:
- name: Checkout code
uses: actions/checkout@v3

- uses: actions/download-artifact@v3
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
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
Expand Down
7 changes: 3 additions & 4 deletions make-msys2-installer
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -e

_spinal_version="1.9.3"
_scala_version="2.11"
_spinal_version="$2"
_scala_version="$1"
_yosys_major_version="0.31"
_verilator_version="4.228-1"
_sbt_version="1.6.0"
Expand All @@ -18,7 +18,6 @@ _dateqif=$(date +'%Y-%m-%d')
_version="${_date}"
_newmsysbase="${_build}/newmsys"
_newmsys="${_newmsysbase}/msys64"
_tagname="$1"
_yosys_version="${_yosys_major_version}-1"

if [ "$MINGW_PACKAGE_PREFIX" = "mingw-w64-i686" ]; then
Expand Down Expand Up @@ -175,7 +174,7 @@ create_installer() {
-p "${_ifwroot}/packages" \
-c "${_ifwroot}/config/config.xml" \
--offline-only \
"${_thisdir}/msys2-x86_64-${_date}.exe" \
"${_thisdir}/msys2-x86_64-${_scala_version}-${_spinal_version}.exe" \
-v
popd > /dev/null
}
Expand Down

0 comments on commit 9d41ff2

Please sign in to comment.