Skip to content

Commit

Permalink
ci: add windows mingw test
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <[email protected]>
  • Loading branch information
Peefy committed Sep 14, 2024
1 parent d9ed471 commit 626a8ad
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/mingw_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: build-and-test-windows-mingw
on: ["push", "pull_request"]
jobs:
build-and-test:
name: build and test on windows mingw
runs-on: windows-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
with:
submodules: "true"

- name: Install rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.79
override: true
components: clippy, rustfmt

- run: C:\msys64\usr\bin\pacman.exe -S --needed mingw-w64-x86_64-gcc --noconfirm
- shell: pwsh
run: echo "C:\msys64\mingw64\bin" >> $Env:GITHUB_PATH

- working-directory: ./kclvm
run: |
rustup target add x86_64-pc-windows-gnu
cargo build -r --target x86_64-pc-windows-gnu
- uses: actions/upload-artifact@v4
with:
name: kcl-windows-mingw
if-no-files-found: error
path: kclvm/target/x86_64-pc-windows-gnu/libkclvm_cli_cdylib.a
4 changes: 1 addition & 3 deletions kclvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = [
"cdylib",
]
crate-type = ["cdylib", "staticlib"]
path = "src/lib.rs"
name = "kclvm_cli_cdylib"

Expand Down

0 comments on commit 626a8ad

Please sign in to comment.