ensure that a copy error results in the task failing clearly #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: windows-artifacts | |
on: | |
push: | |
branches: [ test_artifacts, win_artifacts ] | |
release: | |
types: | |
- published | |
permissions: read-all | |
jobs: | |
windows-artifacts: | |
# see https://ariya.io/2020/07/on-github-actions-with-msys2 | |
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: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v3 | |
- uses: msys2/setup-msys2@61f9e5e925871ba6c9e3e8da24ede83ea27fa91f # tag=v2.27.0 | |
with: | |
msystem: ${{ matrix.msystem }} | |
install: make zlib git p7zip mingw-w64-${{matrix.env}}-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 | |
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 || exit 1 | |
mv bin/ zstd-${{ github.ref_name }}-${{matrix.ziparch}}/ | |
7z a -tzip -mx9 zstd-${{ github.ref_name }}-${{matrix.ziparch}}.zip zstd-${{ github.ref_name }}-${{matrix.ziparch}}/ | |
cd .. | |
- name: Publish zstd-$VERSION-${{matrix.ziparch}}.zip | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # tag=v4.3.1 | |
with: | |
path: ${{ github.workspace }}/zstd-${{ github.ref_name }}-${{matrix.ziparch}}.zip | |
name: zstd-${{ github.ref_name }}-${{matrix.ziparch}}.zip |