Skip to content

Check if an email address exists without sending any email, written in Rust. Comes with a ⚙️ HTTP backend.

ci: added windows to ci job (#983)

Meguminc9815f7fb0fe
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 10c97b4e..5f2f4f3e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -17,8 +17,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- with:
- depth: 50
- uses: XAMPPRocky/get-github-release@v1
id: cross
with:
@@ -39,9 +37,6 @@ jobs:
needs: install-cross
steps:
- uses: actions/checkout@v2
- with:
- depth: 50
-
- uses: actions/download-artifact@v1
with:
name: cross-apple-darwin
@@ -65,14 +60,36 @@ jobs:
# iOS
# - aarch64-apple-ios
# - x86_64-apple-ios
+
+ windows:
+ runs-on: windows-latest
+ needs: install-cross
+ steps:
+ - uses: actions/checkout@v2
+ - uses: shogo82148/actions-setup-perl@v1
+ with:
+ perl-version: '5.32'
+ distribution: strawberry
+
+ - run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}
+ shell: bash
+ - run: ci/build.ps1 cargo ${{ matrix.target }}
+ - run: ci/test.bash cargo ${{ matrix.target }}
+ shell: bash
+ strategy:
+ fail-fast: true
+ matrix:
+ channel: [stable]
+ target:
+ - x86_64-pc-windows-msvc
+ - i686-pc-windows-msvc
+
linux:
runs-on: ubuntu-latest
needs: install-cross
steps:
- uses: actions/checkout@v2
- with:
- depth: 50
- name: Download Cross
uses: actions/download-artifact@v1
@@ -101,8 +118,8 @@ jobs:
# WASM, off by default as most rust projects aren't compatible yet.
# - wasm32-unknown-emscripten
# Linux
- # - aarch64-unknown-linux-gnu
- # - aarch64-unknown-linux-musl
+ - aarch64-unknown-linux-gnu
+ - aarch64-unknown-linux-musl
# - arm-unknown-linux-gnueabi
# - arm-unknown-linux-gnueabihf
# - arm-unknown-linux-musleabi
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index e9232696..aeb0b810 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -34,7 +34,45 @@ jobs:
strategy:
matrix:
platform: [linux-musl, apple-darwin]
-
+
+ windows:
+ runs-on: windows-latest
+ needs: install-cross
+ steps:
+ - uses: actions/checkout@v2
+ - uses: shogo82148/actions-setup-perl@v1
+ with:
+ perl-version: '5.32'
+ distribution: strawberry
+ - run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}
+ shell: bash
+ - run: ci/build.ps1 cargo ${{ matrix.target }} RELEASE
+ - run: tar -czvf ${{ env.BIN }}.tar.gz --directory=target/${{ matrix.target }}/release ${{ env.BIN }}.exe
+ - uses: XAMPPRocky/[email protected]
+ id: create_release
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: ${{ github.ref }}
+ release_name: ${{ github.ref }}
+ draft: false
+ prerelease: false
+ - uses: actions/upload-release-asset@v1
+ id: upload-release-asset
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ steps.create_release.outputs.upload_url }}
+ asset_path: ${{ env.BIN }}.tar.gz
+ asset_name: ${{ env.BIN }}-${{ matrix.target }}.tar.gz
+ asset_content_type: application/gzip
+ strategy:
+ fail-fast: true
+ matrix:
+ channel: [stable]
+ target:
+ - x86_64-pc-windows-msvc
+ - i686-pc-windows-msvc
macos:
runs-on: macos-latest
needs: install-cross
@@ -88,7 +126,7 @@ jobs:
# WASM, off by default as most rust projects aren't compatible yet.
# - wasm32-unknown-emscripten
# Linux
- # - aarch64-unknown-linux-gnu
+ - aarch64-unknown-linux-gnu
# - arm-unknown-linux-gnueabi
# - armv7-unknown-linux-gnueabihf
# - i686-unknown-linux-gnu
diff --git a/ci/build.ps1 b/ci/build.ps1
new file mode 100644
index 00000000..304e4063
--- /dev/null
+++ b/ci/build.ps1
@@ -0,0 +1,10 @@
+$cross = $args[0]
+$target_triple = $args[1]
+$release_build = $args[2]
+
+if ( $release_build -ne "RELEASE" ) {
+ Invoke-Expression "$cross build --target $target_triple"
+ Invoke-Expression "$cross build --target $target_triple --all-features"
+} else {
+ Invoke-Expression "$cross build --target $target_triple --all-features --release"
+}
\ No newline at end of file