Skip to content

Commit b947cdb

Browse files
nipunn1313Convex, Inc.
authored andcommitted
Get oss build working on windows (#25516)
In CI - few bits to have .exe and adding the new job GitOrigin-RevId: bec53817cd240b0d1d1b45b91a7343ea831cfa08
1 parent 16dea50 commit b947cdb

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

.github/workflows/precompile.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
- target: aarch64-apple-darwin
2020
# xlarge are on arm
2121
os: "'macos-latest-xlarge'"
22+
- target: x86_64-pc-windows-msvc
23+
os: "'windows-latest'"
2224
#- target: aarch64-unknown-linux-gnu
2325
# os: ubuntu-latest
2426
name: Build Convex Backend
@@ -65,28 +67,39 @@ jobs:
6567
just rush install
6668
just rush build
6769
70+
- name: Precompute release name
71+
id: release_name
72+
shell: bash
73+
run: |
74+
echo "RELEASE_NAME=$(date +'%Y-%m-%d')-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
75+
ZIP_NAME=convex-local-backend-${{ matrix.target }}.zip
76+
BINARY_NAME=convex-local-backend${{ runner.os == 'Windows' && '.exe' || '' }}
77+
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_OUTPUT
78+
echo "BINARY_NAME=$BINARY_NAME" >> $GITHUB_OUTPUT
79+
6880
- name: Build backend
81+
shell: bash
6982
run: |
83+
set -ex
7084
unset ROCKSDB_LIB_DIR
7185
unset SODIUM_USE_PKG_CONFIG
7286
unset SNAPPY_LIB_DIR
7387
cargo build --release -p local_backend --bin convex-local-backend
88+
mv target/release/${{ steps.release_name.outputs.BINARY_NAME }} .
7489
7590
- name: Zip backend into arch
76-
run: |
77-
mv target/release/convex-local-backend .
78-
zip -r convex-local-backend-${{ matrix.target }} convex-local-backend
79-
80-
- name: Precompute release name
81-
id: release_name
82-
run: echo "RELEASE_NAME=$(date +'%Y-%m-%d')-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
91+
uses: thedoctor0/[email protected]
92+
with:
93+
type: zip
94+
filename: ${{ steps.release_name.outputs.ZIP_NAME }}
95+
path: ${{ steps.release_name.outputs.BINARY_NAME }}
8396

8497
- name: Create Upload Precompiled Artifacts
8598
id: create_release
8699
uses: softprops/action-gh-release@v2
87100
with:
88101
files: |
89-
convex-local-backend-${{ matrix.target }}.zip
102+
${{ steps.release_name.outputs.ZIP_NAME }}
90103
LICENSE.md
91104
tag_name: precompiled-${{ steps.release_name.outputs.RELEASE_NAME }}
92105
name: Precompiled ${{ steps.release_name.outputs.RELEASE_NAME }}

0 commit comments

Comments
 (0)