Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows amd64 support #140

Closed
wants to merge 12 commits into from
Closed
21 changes: 20 additions & 1 deletion .github/workflows/deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,23 @@ jobs:
name: linux_arm64
path: deps/linux_arm64/libduckdb.a
retention-days: 1
windows_amd64:
needs: prepare
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- shell: bash
run: make deps.windows.amd64
- uses: actions/upload-artifact@v3
with:
name: windows_amd64
path: deps/windows_amd64/libduckdb.a
retention-days: 1
commit:
runs-on: ubuntu-latest
needs: [darwin_amd64, darwin_arm64, linux_amd64, linux_arm64]
needs: [darwin_amd64, darwin_arm64, linux_amd64, linux_arm64, windows_amd64]
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -96,6 +110,7 @@ jobs:
rm -f deps/darwin_arm64/libduckdb.a
rm -f deps/linux_amd64/libduckdb.a
rm -f deps/linux_arm64/libduckdb.a
rm -f deps/windows_amd64/libduckdb.a
rm -f duckdb.h
- uses: actions/download-artifact@v3
with:
Expand All @@ -117,6 +132,10 @@ jobs:
with:
name: linux_arm64
path: deps/linux_arm64
- uses: actions/download-artifact@v3
with:
name: windows_amd64
path: deps/windows_amd64
- name: Push static libraries
uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-12]
go: ["1.18"]
os: [ubuntu-latest, macos-12, windows-latest]
go: ["1.20"]
fail-fast: false

steps:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

To upgrade to a new version of DuckDB:

1. Create a new branch with the current version number in it. E.g. `v0.9.0`.
1. Create a new branch with the current version number in it. E.g. `v0.9.2`.
2. Change `DUCKDB_VERSION` in `Makefile` to match the version in the branch name.
3. Push the updated `Makefile` and create a PR.
4. Wait for Github Actions to pre-compile the static libraries in `deps`. They will be committed automatically to the branch.
Expand Down
20 changes: 19 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FILES := $(wildcard $(SRC_DIR)/*)
.PHONY: deps.header
deps.header:
git clone -b v${DUCKDB_VERSION} --depth 1 https://github.com/duckdb/duckdb.git
cp duckdb/src/include/duckdb.h duckdb.h
sed 's/__declspec(dllimport)//g' duckdb/src/include/duckdb.h > duckdb.h

.PHONY: deps.darwin.amd64
deps.darwin.amd64:
Expand Down Expand Up @@ -76,3 +76,21 @@ deps.linux.arm64:
ar rvs ../libduckdb.a *.o && \
cd .. && \
mv libduckdb.a ../deps/linux_arm64/libduckdb.a

.PHONY: deps.windows.amd64
deps.windows.amd64:
git clone -b v${DUCKDB_VERSION} --depth 1 https://github.com/duckdb/duckdb.git
cd duckdb && \
mkdir -p build && \
cmake -G "MinGW Makefiles" \
-DENABLE_EXTENSION_AUTOLOADING=1 \
-DENABLE_EXTENSION_AUTOINSTALL=1 \
-DBUILD_SHELL=0 \
-DBUILD_UNITTESTS=0 \
-DCMAKE_BUILD_TYPE=Release -B build && \
cd build && \
MAKEFLAGS=-j4 cmake --build . --config Release && \
cd ../build && \
for f in `find . -name '*.obj'`; do gcc-ar rvs ../libduckdb.a $$f; done && \
cd .. && \
mv libduckdb.a ../deps/windows_amd64/libduckdb.a
Loading
Loading