diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a7dc8bcf57..6ff24b056c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -94,6 +94,42 @@ jobs: path: | .build-ci/meson-logs/*.txt + windows-msys2-ucrt64: + runs-on: windows-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2.31.0 + with: + msystem: UCRT64 + update: true + install: >- + git + mingw-w64-ucrt-x86_64-gcc + mingw-w64-ucrt-x86_64-pkgconf + mingw-w64-ucrt-x86_64-meson + mingw-w64-ucrt-x86_64-ninja + mingw-w64-ucrt-x86_64-ccache + mingw-w64-ucrt-x86_64-json-c + + - name: Build nvme-cli + shell: msys2 {0} + run: | + set -euxo pipefail + which bash + bash --version + which git + git --version + git config --global --add safe.directory "$GITHUB_WORKSPACE" + scripts/build.sh -b release -c gcc + + - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + if: failure() + with: + name: windows-msys2-ucrt64-logs + path: | + .build-ci/meson-logs/*.txt + cross: runs-on: ubuntu-latest strategy: @@ -225,36 +261,3 @@ jobs: - name: build run: | scripts/build.sh distro - - build-windows: - name: build windows - runs-on: windows-latest - defaults: - run: - shell: msys2 {0} - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Setup MSYS2 - uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2.31.0 - with: - msystem: MINGW64 - update: true - install: > - git - mingw-w64-x86_64-gcc - mingw-w64-x86_64-meson - mingw-w64-x86_64-ninja - mingw-w64-x86_64-pkg-config - mingw-w64-x86_64-json-c - - name: Configure (Meson) - run: | - meson setup .build-ci \ - --prefix=/mingw64 \ - -Dversion-tag=master \ - -Ddefault_library=static - - name: Build - run: | - meson compile -C .build-ci - - name: Run tests (optional) - run: | - meson test -C .build-ci || true diff --git a/libnvme/doc/meson.build b/libnvme/doc/meson.build index 16c437d6dd..7d36f8a178 100644 --- a/libnvme/doc/meson.build +++ b/libnvme/doc/meson.build @@ -49,9 +49,11 @@ subdir('rst') top_source_dir = meson.current_source_dir() + '/../' kernel_doc = find_program(top_source_dir + 'scripts/kernel-doc') -kernel_doc_check = find_program(top_source_dir +'scripts/kernel-doc-check') +kernel_doc_check = files('../scripts/kernel-doc-check') +# Find the path to bash and use it so we don't pick up the WSL bash in Windows. +bash_prog = find_program('bash', required: true) -test('libnvme - kdoc', kernel_doc_check, args: api_paths) +test('libnvme - kdoc', bash_prog, args: [kernel_doc_check] + api_paths) if want_docs != 'false' if want_docs == 'all' or want_docs == 'man' diff --git a/meson.build b/meson.build index c5d9878f8b..2956ea3b5b 100644 --- a/meson.build +++ b/meson.build @@ -123,8 +123,11 @@ version_tag = get_option('version-tag') if version_tag != '' conf.set('GIT_VERSION', '"@0@"'.format(version_tag)) else + # Find the path to bash and use it so we don't pick up the WSL bash in Windows. + bash_prog = find_program('bash', required: true) r = run_command( - 'scripts/meson-vcs-tag.sh', + bash_prog, + files('scripts/meson-vcs-tag.sh'), meson.current_source_dir(), meson.project_version(), check: true,