Skip to content

Commit f2779be

Browse files
committed
enable Windows builds again
1 parent bfc71f7 commit f2779be

File tree

4 files changed

+42
-18
lines changed

4 files changed

+42
-18
lines changed

.github/workflows/main.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ jobs:
2323
matrix:
2424
build:
2525
- linux
26-
# - windows
26+
- windows
2727
include:
2828
- build: linux
2929
os: ubuntu-20.04
3030
config: gnu
31-
# - build: windows
32-
# os: windows-2019
33-
# config: cl
31+
- build: windows
32+
os: windows-2019
33+
config: cl
3434

3535
steps:
3636
- name: Checkout repository
@@ -60,7 +60,7 @@ jobs:
6060
- jammy
6161
- noble
6262
- macos-universal
63-
# - windows
63+
- windows
6464
include:
6565
- build: focal
6666
os: ubuntu-20.04
@@ -78,10 +78,10 @@ jobs:
7878
os: macos-latest
7979
config: gnu
8080
pkgfile: bazel-compile-commands_${{ github.event.inputs.version || 0 }}-macos_universal.zip
81-
# - build: windows
82-
# os: windows-2019
83-
# config: cl
84-
# pkgfile: bazel-compile-commands_${{ github.event.inputs.version || 0 }}-windows_amd64.zip
81+
- build: windows
82+
os: windows-2019
83+
config: cl
84+
pkgfile: bazel-compile-commands_${{ github.event.inputs.version || 0 }}-windows_amd64.zip
8585

8686
steps:
8787
- name: Checkout repository

BUILD

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ filegroup(
3434
srcs = select({
3535
"@platforms//os:linux": ["@pandoc_linux_x86_64//:pandoc"],
3636
"@platforms//os:macos": [":pandoc_macos"],
37-
"@platforms//os:windows": ["@pandoc_windowss_x86_64//:pandoc"],
37+
"@platforms//os:windows": ["@pandoc_windows_x86_64//:pandoc"],
3838
}),
3939
)
4040

@@ -46,6 +46,14 @@ genrule(
4646
tools = [":pandoc"],
4747
)
4848

49+
genrule(
50+
name = "html",
51+
srcs = ["documentation.md"],
52+
outs = ["bazel-compile-commands.html"],
53+
cmd = "$(location :pandoc) -f markdown -t html -o $@ $(location documentation.md)",
54+
tools = [":pandoc"],
55+
)
56+
4957
pkg_files(
5058
name = "bin_files",
5159
srcs = [
@@ -61,15 +69,29 @@ pkg_files(
6169
prefix = "share/man/man1",
6270
)
6371

72+
pkg_files(
73+
name = "doc_files",
74+
srcs = [":html"],
75+
prefix = "share/doc",
76+
)
77+
6478
pkg_filegroup(
6579
name = "usr_files",
6680
srcs = [
6781
":bin_files",
68-
":man_files",
69-
],
82+
] + select({
83+
"@platforms//os:windows": [":doc_files"],
84+
"//conditions:default": [":man_files"],
85+
}),
7086
prefix = "/usr",
7187
)
7288

89+
pkg_tar(
90+
name = "tar",
91+
srcs = [":usr_files"],
92+
extension = "tar.gz",
93+
)
94+
7395
pkg_deb(
7496
name = "deb",
7597
architecture = select({
@@ -87,11 +109,6 @@ pkg_deb(
87109
version_file = "@//:version_file",
88110
)
89111

90-
pkg_tar(
91-
name = "tar",
92-
srcs = [":usr_files"],
93-
)
94-
95112
pkg_zip(
96113
name = "zip",
97114
srcs = [":usr_files"],

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,5 @@ http_archive(
8080
urls = ["https://github.com/jgm/pandoc/releases/download/3.6/pandoc-3.6-windows-x86_64.zip"],
8181
integrity = "sha256-BnMre5bTuZ9xG6G/JPKJ/LW8lWEZK9wb2VFMF8iqLCA=",
8282
strip_prefix = "pandoc-3.6",
83-
build_file = "//bazel:pandoc.BUILD",
83+
build_file = "//bazel:pandoc-windows.BUILD",
8484
)

bazel/pandoc-windows.BUILD

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
filegroup(
2+
name = "pandoc",
3+
srcs = [
4+
"pandoc.exe",
5+
],
6+
visibility = ["//visibility:public"],
7+
)

0 commit comments

Comments
 (0)