Change to use strategy.matrix
This commit is contained in:
@@ -10,9 +10,15 @@ on:
|
|||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
windows-64-artifacts:
|
windows-artifacts:
|
||||||
# see https://ariya.io/2020/07/on-github-actions-with-msys2
|
# see https://ariya.io/2020/07/on-github-actions-with-msys2
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
# see https://github.com/msys2/setup-msys2
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- { msystem: mingw64, env: x86_64, ziparch: win64 }
|
||||||
|
- { msystem: mingw32, env: i686, ziparch: win32 }
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
@@ -20,9 +26,10 @@ jobs:
|
|||||||
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # tag=v3
|
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # tag=v3
|
||||||
- uses: msys2/setup-msys2@5beef6d11f48bba68b9eb503e3adc60b23c0cc36 # tag=v2
|
- uses: msys2/setup-msys2@5beef6d11f48bba68b9eb503e3adc60b23c0cc36 # tag=v2
|
||||||
with:
|
with:
|
||||||
msystem: MINGW64
|
msystem: ${{ matrix.msystem }}
|
||||||
install: make zlib git p7zip mingw-w64-x86_64-gcc
|
install: make zlib git p7zip mingw-w64-${{matrix.env}}-gcc
|
||||||
update: true
|
update: true
|
||||||
|
|
||||||
- name: display versions
|
- name: display versions
|
||||||
run: |
|
run: |
|
||||||
make -v
|
make -v
|
||||||
@@ -33,55 +40,19 @@ jobs:
|
|||||||
git clone --depth 1 --branch v1.2.11 https://github.com/madler/zlib
|
git clone --depth 1 --branch v1.2.11 https://github.com/madler/zlib
|
||||||
make -C zlib -f win32/Makefile.gcc libz.a
|
make -C zlib -f win32/Makefile.gcc libz.a
|
||||||
|
|
||||||
- name: Building zstd programs in 64-bit mode
|
|
||||||
run: |
|
|
||||||
CPPFLAGS=-I../zlib LDFLAGS=../zlib/libz.a make -j allzstd MOREFLAGS=-static V=1
|
|
||||||
|
|
||||||
- name: Create artifacts
|
|
||||||
run: |
|
|
||||||
./lib/dll/example/build_package.bat
|
|
||||||
mv bin/ zstd-${{ github.ref_name }}-win64/
|
|
||||||
7z a -tzip -mx9 zstd-${{ github.ref_name }}-win64.zip zstd-${{ github.ref_name }}-win64/
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Publish zstd-$VERSION-win64.zip
|
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag=v3
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/zstd-${{ github.ref_name }}-win64.zip
|
|
||||||
name: zstd-${{ github.ref_name }}-win64.zip
|
|
||||||
|
|
||||||
windows-32-artifacts:
|
|
||||||
# see https://ariya.io/2020/07/on-github-actions-with-msys2
|
|
||||||
runs-on: windows-latest
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: msys2 {0}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # tag=v3
|
|
||||||
- uses: msys2/setup-msys2@5beef6d11f48bba68b9eb503e3adc60b23c0cc36 # tag=v2
|
|
||||||
with:
|
|
||||||
msystem: MINGW32
|
|
||||||
install: make zlib git p7zip mingw-w64-i686-gcc
|
|
||||||
update: true
|
|
||||||
- name: display versions
|
|
||||||
run: |
|
|
||||||
make -v
|
|
||||||
cc -v
|
|
||||||
- name: Building zlib to static link
|
|
||||||
run: |
|
|
||||||
git clone --depth 1 --branch v1.2.11 https://github.com/madler/zlib
|
|
||||||
make -C zlib -f win32/Makefile.gcc libz.a
|
|
||||||
- name: Building zstd programs
|
- name: Building zstd programs
|
||||||
run: |
|
run: |
|
||||||
CPPFLAGS=-I../zlib LDFLAGS=../zlib/libz.a make -j allzstd MOREFLAGS=-static V=1
|
CPPFLAGS=-I../zlib LDFLAGS=../zlib/libz.a make -j allzstd MOREFLAGS=-static V=1
|
||||||
|
|
||||||
- name: Create artifacts
|
- name: Create artifacts
|
||||||
run: |
|
run: |
|
||||||
./lib/dll/example/build_package.bat
|
./lib/dll/example/build_package.bat
|
||||||
mv bin/ zstd-${{ github.ref_name }}-win32/
|
mv bin/ zstd-${{ github.ref_name }}-${{matrix.ziparch}}/
|
||||||
7z a -tzip -mx9 zstd-${{ github.ref_name }}-win32.zip zstd-${{ github.ref_name }}-win32/
|
7z a -tzip -mx9 zstd-${{ github.ref_name }}-${{matrix.ziparch}}.zip zstd-${{ github.ref_name }}-${{matrix.ziparch}}/
|
||||||
cd ..
|
cd ..
|
||||||
- name: Publish zstd-$VERSION-win32.zip
|
|
||||||
|
- name: Publish zstd-$VERSION-${{matrix.ziparch}}.zip
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag=v3
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag=v3
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/zstd-${{ github.ref_name }}-win32.zip
|
path: ${{ github.workspace }}/zstd-${{ github.ref_name }}-${{matrix.ziparch}}.zip
|
||||||
name: zstd-${{ github.ref_name }}-win32.zip
|
name: zstd-${{ github.ref_name }}-${{matrix.ziparch}}.zip
|
||||||
|
|||||||
Reference in New Issue
Block a user