fix libxml2 #370
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
# Job execution time - Each job in a workflow can run for up to 6 hours of execution time. | |
# Workflow run time - Each workflow run is limited to 35 days | |
name: windows | |
on: | |
push: | |
branches: [ "main" ] | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: msys2 {0} | |
jobs: | |
should_run: | |
runs-on: ubuntu-latest | |
name: should_i_run | |
outputs: | |
output1: ${{ steps.check.outputs.target_commit_id }} | |
steps: | |
- name: check | |
run: | | |
wget https://gist.github.com/mgood7123/47957c59a4b0cbda11875632ee0b8f15/raw/7e876a60f2735cf7e60150a9a29edf6ddaad20a8/check.cpp -O check.cpp | |
cat << EOF > data.json | |
${{toJSON(github.event.commits.*)}} | |
EOF | |
cat -n data.json | |
git clone https://github.com/danielaparker/jsoncons --depth=1 | |
g++ --std=c++17 -I jsoncons/include check.cpp -o check | |
./check 2 >> "$GITHUB_OUTPUT" # check for android [1] windows [2] linux [3] macos [4] | |
shell: bash | |
build: | |
needs: should_run | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
name: windows | |
sys: clang64 | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.name }} | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{needs.should_run.outputs.output1}} | |
submodules: recursive | |
- name: '${{ matrix.icon }} Setup MSYS2' | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{matrix.sys}} | |
update: true | |
path-type: strict | |
- name: test symlink support | |
run: | | |
export MSYS=winsymlinks:native | |
touch a | |
ln -s a b | |
cp -v -r zstd/tests/cli-tests/bin . | |
rm -f a | |
rm -f b | |
rm -rf bin | |
- name: update packages | |
run: | | |
pacman -Sy | |
- name: install pacboy | |
run: | | |
pacman -Syu --noconfirm --needed pactoys | |
- name: update packages | |
run: | | |
pacboy -Sy | |
- name: install findutils | |
run: | | |
pacboy -S --noconfirm --needed findutils | |
which find | |
ls -l /usr/bin/find.exe | |
- name: install clang 17 | |
run: | | |
pacboy -S --noconfirm --needed clang:p | |
- name: install cmake | |
run: | | |
pacboy -S --noconfirm --needed make:p cmake:p | |
- name: install autotools | |
run: | | |
pacboy -S --noconfirm --needed autotools:p | |
- name: install patch | |
run: | | |
pacboy -S --noconfirm --needed patch | |
- name: install gperf | |
run: | | |
pacboy -S --noconfirm --needed gperf:p | |
- name: install groff | |
run: | | |
pacboy -S --noconfirm --needed groff | |
- name: install git | |
run: | | |
pacboy -S --noconfirm --needed git | |
- name: install gettext | |
run: | | |
pacboy -S --noconfirm --needed gettext | |
- name: clone libiconv | |
run: | | |
export MSYS=winsymlinks:native | |
git clone git://git.savannah.gnu.org/libiconv.git libiconv --recursive --depth=1 | |
- name: libiconv autopull.sh | |
run: | | |
export MSYS=winsymlinks:native | |
cd libiconv ; ./autopull.sh --one-time | |
- name: cmake build - Debug - Generate | |
run: | | |
export MSYS=winsymlinks:native | |
export ACLOCAL_PATH=D:/a/_temp/msys64/usr/share/aclocal | |
mkdir BUILD_DEBUG | |
mkdir ROOTFS_DEBUG | |
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=ROOTFS_DEBUG -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-g3 -O0" -DCMAKE_CXX_FLAGS="-g3 -O0" -DCMAKE_MAKE_PROGRAM=mingw32-make -DCMAKE_COLOR_DIAGNOSTICS=ON -DCMAKE_COLOR_MAKEFILE=ON -S . -B BUILD_DEBUG | |
- name: cmake build - Debug - Build | |
run: | | |
export MSYS=winsymlinks:native | |
cmake --build BUILD_DEBUG | |
- name: cmake build - Debug - Install | |
run: | | |
export MSYS=winsymlinks:native | |
cmake --install BUILD_DEBUG | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: program-windows.exe | |
# path: ./program-windows.exe | |
# retention-days: 1 |