Check if an email address exists without sending any email, written in Rust. Comes with a ⚙️ HTTP backend.
Rust emailemail-validationemail-validation-apiemail-verificationemail-verification-apiemail-verifierhacktoberfest
ci: Remove appveyor and travis, use GA (#904)
Amaury4f665a32e048
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlnew file mode 100644index 00000000..10c97b4e--- /dev/null+++ b/.github/workflows/ci.yml@@ -0,0 +1,153 @@+name: CI++on:+ push:+ branches:+ - master+ pull_request:+ branches:+ - master++jobs:+ # This job downloads and stores `cross` as an artifact, so that it can be+ # redownloaded across all of the jobs. Currently this copied pasted between+ # `ci.yml` and `deploy.yml`. Make sure to update both places when making+ # changes.+ install-cross:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v2+ with:+ depth: 50+ - uses: XAMPPRocky/get-github-release@v1+ id: cross+ with:+ owner: rust-embedded+ repo: cross+ matches: ${{ matrix.platform }}+ token: ${{ secrets.GITHUB_TOKEN }}+ - uses: actions/upload-artifact@v1+ with:+ name: cross-${{ matrix.platform }}+ path: ${{ steps.cross.outputs.install_path }}+ strategy:+ matrix:+ platform: [linux-musl, apple-darwin]++ macos:+ runs-on: macos-latest+ needs: install-cross+ steps:+ - uses: actions/checkout@v2+ with:+ depth: 50++ - uses: actions/download-artifact@v1+ with:+ name: cross-apple-darwin+ path: /usr/local/bin/++ - run: chmod +x /usr/local/bin/cross++ - run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}+ - run: ci/build.bash cross ${{ matrix.target }}+ # Only test on macOS platforms since we can't simulate the others.+ - run: ci/test.bash cross ${{ matrix.target }}+ if: matrix.target == 'x86_64-apple-darwin'++ strategy:+ fail-fast: true+ matrix:+ channel: [stable] # channel: [stable, beta, nightly]+ target:+ # macOS+ - x86_64-apple-darwin+ # iOS+ # - aarch64-apple-ios+ # - x86_64-apple-ios++ linux:+ runs-on: ubuntu-latest+ needs: install-cross+ steps:+ - uses: actions/checkout@v2+ with:+ depth: 50++ - name: Download Cross+ uses: actions/download-artifact@v1+ with:+ name: cross-linux-musl+ path: /tmp/+ - run: chmod +x /tmp/cross+ - run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }}+ - run: ci/build.bash /tmp/cross ${{ matrix.target }}+ # These targets have issues with being tested so they are disabled+ # by default. You can try disabling to see if they work for+ # your project.+ - run: ci/test.bash /tmp/cross ${{ matrix.target }}+ if: |+ !contains(matrix.target, 'android') &&+ !contains(matrix.target, 'bsd') &&+ !contains(matrix.target, 'solaris') &&+ matrix.target != 'armv5te-unknown-linux-musleabi' &&+ matrix.target != 'sparc64-unknown-linux-gnu'++ strategy:+ fail-fast: true+ matrix:+ channel: [stable] # channel: [stable, beta, nightly]+ target:+ # WASM, off by default as most rust projects aren't compatible yet.+ # - wasm32-unknown-emscripten+ # Linux+ # - aarch64-unknown-linux-gnu+ # - aarch64-unknown-linux-musl+ # - arm-unknown-linux-gnueabi+ # - arm-unknown-linux-gnueabihf+ # - arm-unknown-linux-musleabi+ # - arm-unknown-linux-musleabihf+ # - armv5te-unknown-linux-musleabi+ # - armv7-unknown-linux-gnueabihf+ # - armv7-unknown-linux-musleabihf+ # - i586-unknown-linux-gnu+ # - i586-unknown-linux-musl+ # - i686-unknown-linux-gnu+ # - i686-unknown-linux-musl+ # - mips-unknown-linux-gnu+ # - mips-unknown-linux-musl+ # - mips64-unknown-linux-gnuabi64+ # - mips64el-unknown-linux-gnuabi64+ # - mipsel-unknown-linux-gnu+ # - mipsel-unknown-linux-musl+ # - powerpc-unknown-linux-gnu+ # - powerpc64-unknown-linux-gnu+ # - powerpc64le-unknown-linux-gnu+ # - s390x-unknown-linux-gnu+ - x86_64-unknown-linux-gnu+ - x86_64-unknown-linux-musl+ # - sparc64-unknown-linux-gnu+ # Android+ # - aarch64-linux-android+ # - arm-linux-androideabi+ # - armv7-linux-androideabi+ # - i686-linux-android+ # - x86_64-linux-android+ # *BSD+ # The FreeBSD targets can have issues linking so they are disabled+ # by default.+ # - i686-unknown-freebsd+ # - x86_64-unknown-freebsd+ # - x86_64-unknown-netbsd+ # DragonFly (Doesn't currently work)+ # - x86_64-unknown-dragonfly+ # Solaris+ # - sparcv9-sun-solaris+ # - x86_64-sun-solaris+ # Bare Metal+ # These are no-std embedded targets, so they will only build if your+ # crate is `no_std` compatible.+ # - thumbv6m-none-eabi+ # - thumbv7em-none-eabi+ # - thumbv7em-none-eabihf+ # - thumbv7m-none-eabidiff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.ymlnew file mode 100644index 00000000..e9232696--- /dev/null+++ b/.github/workflows/deploy.yml@@ -0,0 +1,171 @@+on:+ push:+ # Sequence of patterns matched against refs/tags+ tags:+ - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10++name: deploy+env:+ # TODO: Rename to your binary+ BIN: check_if_email_exists++jobs:+ # This job downloads and stores `cross` as an artifact, so that it can be+ # redownloaded across all of the jobs. Currently this copied pasted between+ # `mean_bean_ci.yml` and `mean_bean_deploy.yml`. Make sure to update both places when making+ # changes.+ install-cross:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v1+ with:+ depth: 50+ - uses: XAMPPRocky/get-github-release@v1+ id: cross+ with:+ owner: rust-embedded+ repo: cross+ matches: ${{ matrix.platform }}+ token: ${{ secrets.GITHUB_TOKEN }}+ - uses: actions/upload-artifact@v1+ with:+ name: cross-${{ matrix.platform }}+ path: ${{ steps.cross.outputs.install_path }}+ strategy:+ matrix:+ platform: [linux-musl, apple-darwin]++ macos:+ runs-on: macos-latest+ needs: install-cross+ strategy:+ matrix:+ target:+ # macOS+ - x86_64-apple-darwin+ # iOS+ # - aarch64-apple-ios+ # - armv7-apple-ios+ # - armv7s-apple-ios+ # - i386-apple-ios+ # - x86_64-apple-ios+ steps:+ - uses: actions/checkout@v2+ - uses: actions/download-artifact@v1+ with:+ name: cross-apple-darwin+ path: /usr/local/bin/+ - run: chmod +x /usr/local/bin/cross++ - run: ci/set_rust_version.bash stable ${{ matrix.target }}+ - run: ci/build.bash cross ${{ matrix.target }} RELEASE+ - run: tar -czvf ${{ env.BIN }}.tar.gz --directory=target/${{ matrix.target }}/release ${{ env.BIN }}+ - 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++ linux:+ runs-on: ubuntu-latest+ needs: install-cross+ strategy:+ matrix:+ target:+ # WASM, off by default as most rust projects aren't compatible yet.+ # - wasm32-unknown-emscripten+ # Linux+ # - aarch64-unknown-linux-gnu+ # - arm-unknown-linux-gnueabi+ # - armv7-unknown-linux-gnueabihf+ # - i686-unknown-linux-gnu+ # - i686-unknown-linux-musl+ # - mips-unknown-linux-gnu+ # - mips64-unknown-linux-gnuabi64+ # - mips64el-unknown-linux-gnuabi64+ # - mipsel-unknown-linux-gnu+ # - powerpc-unknown-linux-gnu+ # - powerpc64-unknown-linux-gnu+ # - powerpc64le-unknown-linux-gnu+ # - s390x-unknown-linux-gnu+ - x86_64-unknown-linux-gnu+ - x86_64-unknown-linux-musl+ # Android+ # - aarch64-linux-android+ # - arm-linux-androideabi+ # - armv7-linux-androideabi+ # - i686-linux-android+ # - x86_64-linux-android+ # *BSD+ # The FreeBSD targets can have issues linking so they are disabled+ # by default.+ # - i686-unknown-freebsd+ # - x86_64-unknown-freebsd+ # - x86_64-unknown-netbsd+ # Solaris+ # - sparcv9-sun-solaris+ # Bare Metal+ # These are no-std embedded targets, so they will only build if your+ # crate is `no_std` compatible.+ # - thumbv6m-none-eabi+ # - thumbv7em-none-eabi+ # - thumbv7em-none-eabihf+ # - thumbv7m-none-eabi+ steps:+ - uses: actions/checkout@v2+ - uses: actions/download-artifact@v1+ with:+ name: cross-linux-musl+ path: /tmp/+ - run: chmod +x /tmp/cross++ - run: ci/set_rust_version.bash stable ${{ matrix.target }}+ - run: ci/build.bash /tmp/cross ${{ matrix.target }} RELEASE+ - run: tar -czvf ${{ env.BIN }}.tar.gz --directory=target/${{ matrix.target }}/release ${{ env.BIN }}+ - 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+ - name: Upload Release Asset+ id: upload-release-asset+ uses: actions/upload-release-asset@v1+ 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++ docker-publish:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@master+ - name: Set GITHUB_TAG env+ id: vars+ run: echo ::set-output name=GITHUB_TAG::${GITHUB_REF:10} # Remove /refs/head/+ - name: Publish to Registry+ uses: elgohr/Publish-Docker-Github-Action@master+ with:+ name: reacherhq/check-if-email-exists+ username: ${{ secrets.DOCKER_USERNAME }}+ password: ${{ secrets.DOCKER_PASSWORD }}+ tags: "latest,${{ steps.vars.outputs.GITHUB_TAG }}"diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.ymlindex 1363aa3f..90d67928 100644--- a/.github/workflows/pr.yml+++ b/.github/workflows/pr.yml@@ -9,47 +9,6 @@ on:- masterjobs:- check:- runs-on: ubuntu-latest- steps:- - name: Checkout sources- uses: actions/checkout@v2-- - name: Install stable toolchain- uses: actions-rs/toolchain@v1- with:- profile: minimal- toolchain: stable- override: true-- - name: Run cargo check- uses: actions-rs/cargo@v1- with:- command: check-- test:- runs-on: ${{ matrix.os }}- strategy:- matrix:- os: [ubuntu-latest, windows-latest, macOS-latest]-- steps:- - name: Checkout sources- uses: actions/checkout@v2-- - name: Install stable toolchain- uses: actions-rs/toolchain@v1- with:- profile: minimal- toolchain: stable- override: true-- - name: Run cargo test- uses: actions-rs/cargo@v1- with:- command: test- args: --all-lints:runs-on: ubuntu-lateststeps:diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.ymldeleted file mode 100644index 73a710b9..00000000--- a/.github/workflows/tag.yml+++ /dev/null@@ -1,22 +0,0 @@-name: tag--on:- push:- tags:- - "v*.*.*"--jobs:- docker-publish:- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@master- - name: Set GITHUB_TAG env- id: vars- run: echo ::set-output name=GITHUB_TAG::${GITHUB_REF:10} # Remove /refs/head/- - name: Publish to Registry- uses: elgohr/Publish-Docker-Github-Action@master- with:- name: reacherhq/check-if-email-exists- username: ${{ secrets.DOCKER_USERNAME }}- password: ${{ secrets.DOCKER_PASSWORD }}- tags: "latest,${{ steps.vars.outputs.GITHUB_TAG }}"diff --git a/.travis.yml b/.travis.ymldeleted file mode 100644index f3c65240..00000000--- a/.travis.yml+++ /dev/null@@ -1,131 +0,0 @@-# Based on the "trust" template v0.1.2-# https://github.com/japaric/trust/tree/v0.1.2--dist: trusty-language: rust-services: docker-sudo: required--# TODO Rust builds on stable by default, this can be-# overridden on a case by case basis down below.--env:- global:- # TODO Update this to match the name of your project.- - CRATE_NAME=check-if-email-exists--matrix:- # TODO These are all the build jobs. Adjust as necessary. Comment out what you- # don't need- include:- # Android- # - env: TARGET=aarch64-linux-android DISABLE_TESTS=1- # - env: TARGET=arm-linux-androideabi DISABLE_TESTS=1- # - env: TARGET=armv7-linux-androideabi DISABLE_TESTS=1- # - env: TARGET=i686-linux-android DISABLE_TESTS=1- # - env: TARGET=x86_64-linux-android DISABLE_TESTS=1-- # iOS- # - env: TARGET=aarch64-apple-ios DISABLE_TESTS=1- # os: osx- # - env: TARGET=armv7-apple-ios DISABLE_TESTS=1- # os: osx- # - env: TARGET=armv7s-apple-ios DISABLE_TESTS=1- # os: osx- # - env: TARGET=i386-apple-ios DISABLE_TESTS=1- # os: osx- # - env: TARGET=x86_64-apple-ios DISABLE_TESTS=1- # os: osx-- # Linux- # - env: TARGET=aarch64-unknown-linux-gnu- # - env: TARGET=arm-unknown-linux-gnueabi- # - env: TARGET=armv7-unknown-linux-gnueabihf- # - env: TARGET=i686-unknown-linux-gnu- # - env: TARGET=i686-unknown-linux-musl- # - env: TARGET=mips-unknown-linux-gnu- # - env: TARGET=mips64-unknown-linux-gnuabi64- # - env: TARGET=mips64el-unknown-linux-gnuabi64- # - env: TARGET=mipsel-unknown-linux-gnu- # - env: TARGET=powerpc-unknown-linux-gnu- # - env: TARGET=powerpc64-unknown-linux-gnu- # - env: TARGET=powerpc64le-unknown-linux-gnu- # - env: TARGET=s390x-unknown-linux-gnu DISABLE_TESTS=1- - env: TARGET=x86_64-unknown-linux-gnu- - env: TARGET=x86_64-unknown-linux-musl-- # OSX- # - env: TARGET=i686-apple-darwin- # os: osx- - env: TARGET=x86_64-apple-darwin- os: osx-- # *BSD- # - env: TARGET=i686-unknown-freebsd DISABLE_TESTS=1- # - env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1- # - env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1- # Windows- # - env: TARGET=x86_64-pc-windows-gnu- # Bare metal- # These targets don't support std and as such are likely not suitable for- # most crates.- # - env: TARGET=thumbv6m-none-eabi- # - env: TARGET=thumbv7em-none-eabi- # - env: TARGET=thumbv7em-none-eabihf- # - env: TARGET=thumbv7m-none-eabi- # Testing other channels- # - env: TARGET=x86_64-unknown-linux-gnu- # rust: nightly- # - env: TARGET=x86_64-apple-darwin- # os: osx- # rust: nightly--before_install:- - set -e- - rustup self update--install:- - sh ci/install.sh- - source ~/.cargo/env || true--script:- - bash ci/script.sh--after_script: set +e--before_deploy:- - sh ci/before_deploy.sh--deploy:- # TODO update `api_key.secure`- # - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new- # - Encrypt it: `travis encrypt 0123456789012345678901234567890123456789- # - Paste the output down here- api_key:- secure: KvLN76LDAHOLY5gNF5dBt+uYl17cE8BHait6cyJiuX/iwYVmnpFA0DLMIescVqsrRAjj03X3fzDpKtUqo3AYGZCdYySFze53nHzDeq9YN0Jf4LUx3USZraczEC2oMpZx9G9ZKoi5ptvCWhSY9XjSRZR0IF113wOoMqh7hlJ+9rR5BVd8XLLixeoxTYyNCU54lhPSnmSmy+nDdyRg5KuWughOCtFT5x/vjO8GIEipotda6o9k1efNyRgIG81nhWosro1xA2SYbY9iPosyxq9HsCM17V08wUwsouwJ9zP9Kgwe5a+wESXMHqTqsEC8HJ0RL0+Z2MjfCRgU8KFWYmqyxGpINeo4YjlOwqdzW/e+mKtKZaDcOqZq8SPfcFEuUvha//GMShudJdf8hUGU0CKeEN5/hwd9qVe3vOx5JuChdWm339Q/1c1E9gufJXv6hNRpGOL0UM3Onxs6XlnZdirqmfrJ1pGWau0HUZ7H22GRJQj7BtvAkoNGwptAkODNRQdd8f25TPruyugkX04q78mnF+06f040m4+gl5wBEwFyjMjRcfmC0X1LkHsLh5oBD1h27twi5/nRpiqfNlfr+5C+kDhG7tbxh35TD6+JU51B5pnXxHb6cFtyKsg4/yDlAebXg1IRj+V+25r2KBw9dH6OiQ0otQtLRnayAOPM6zN7WFw=- file_glob: true- file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.*- on:- # TODO Here you can pick which targets will generate binary releases- # In this example, there are some targets that are tested using the stable- # and nightly channels. This condition makes sure there is only one release- # for such targets and that's generated using the stable channel- condition: $TRAVIS_RUST_VERSION = stable- tags: true- provider: releases- skip_cleanup: true--cache: cargo-before_cache:- # Travis can't cache files that are not readable by "others"- - chmod -R a+r $HOME/.cargo--branches:- only:- # release tags- - /^v\d+\.\d+\.\d+.*$/- # - master # We used to run Travis on each PR, but now we only have limited Travis credits.--notifications:- email:- on_success: neverdiff --git a/Cargo.lock b/Cargo.lockindex 413a12a9..28aefc48 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -334,6 +334,7 @@ dependencies = ["env_logger","hyper","once_cell",+ "openssl","serde","serde_json","tokio",@@ -1055,9 +1056,9 @@ checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"[[package]]name = "openssl"-version = "0.10.35"+version = "0.10.36"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "549430950c79ae24e6d02e0b7404534ecf311d94cc9f861e9e4020187d13d885"+checksum = "8d9facdb76fec0b73c406f125d44d86fdad818d66fef0531eec9233ca425ff4a"dependencies = ["bitflags","cfg-if",@@ -1073,15 +1074,25 @@ version = "0.1.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a"+[[package]]+name = "openssl-src"+version = "111.16.0+1.1.1l"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7ab2173f69416cf3ec12debb5823d244127d23a9b127d5a5189aa97c5fa2859f"+dependencies = [+ "cc",+]+[[package]]name = "openssl-sys"-version = "0.9.64"+version = "0.9.66"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "209efc2fe0e980c8849efacdb567f975a1c80245c4f6980d6f012733bfa851af"+checksum = "1996d2d305e561b70d1ee0c53f1542833f4e1ac6ce9a6708b6ff2738ca67dc82"dependencies = ["autocfg","cc","libc",+ "openssl-src","pkg-config","vcpkg",]diff --git a/Cargo.toml b/Cargo.tomlindex ca04da7a..a3a0e4fe 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -17,6 +17,7 @@ check-if-email-exists = { path = "./core" }clap = "3.0.0-beta.4"env_logger = "0.9.0"once_cell = "1.8.0"+openssl = { version = "0.10.36", features = ["vendored"] }serde = "1.0.128"serde_json = "1.0.67"diff --git a/README.md b/README.mdindex 6078331f..60ace820 100644--- a/README.md+++ b/README.md@@ -106,7 +106,7 @@ Optionally, you can also pass in `from_email` and `hello_name` fields into the J> Note: The binary doesn't connect to any backend, it checks the email directly from your computer.-Head to the [releases page](https://github.com/reacherhq/check-if-email-exists/releases) and download the binary for your platform. Make sure you have [`openssl`](https://www.openssl.org/) installed on your local machine.+Head to the [releases page](https://github.com/reacherhq/check-if-email-exists/releases) and download the binary for your platform.```> $ check_if_email_exists --helpdiff --git a/appveyor.yml b/appveyor.ymldeleted file mode 100644index 68d75298..00000000--- a/appveyor.yml+++ /dev/null@@ -1,93 +0,0 @@-# Based on the "trust" template v0.1.2-# https://github.com/japaric/trust/tree/v0.1.2--environment:- global:- # TODO This is the Rust channel that build jobs will use by default but can be- # overridden on a case by case basis down below- RUST_VERSION: stable-- # TODO Update this to match the name of your project.- BIN_NAME: check_if_email_exists- CRATE_NAME: check-if-email-exists-- # TODO These are all the build jobs. Adjust as necessary. Comment out what you- # don't need- matrix:- # MinGW- # - TARGET: i686-pc-windows-gnu- # - TARGET: x86_64-pc-windows-gnu-- # MSVC- # - TARGET: i686-pc-windows-msvc- - TARGET: x86_64-pc-windows-msvc-- # Testing other channels- # - TARGET: x86_64-pc-windows-gnu- # RUST_VERSION: nightly- # - TARGET: x86_64-pc-windows-msvc- # RUST_VERSION: nightly--install:- - ps: >-- If ($env:TARGET -eq 'x86_64-pc-windows-gnu') {- $env:PATH += ';C:\msys64\mingw64\bin'- } ElseIf ($env:TARGET -eq 'i686-pc-windows-gnu') {- $env:PATH += ';C:\msys64\mingw32\bin'- }- - curl -sSf -o rustup-init.exe https://win.rustup.rs/- - rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION%- - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin- - rustc -Vv- - cargo -V--# TODO This is the "test phase", tweak it as you see fit-# TODO Add cargo run, which currently doesn't work-test_script:- # we don't run the "test phase" when doing deploys- - if [%APPVEYOR_REPO_TAG%]==[false] (- cargo build --target %TARGET% &&- cargo build --target %TARGET% --release &&- cargo test --all --target %TARGET% &&- cargo test --all --target %TARGET% --release- )--before_deploy:- # TODO Update this to build the artifacts that matter to you- - cargo rustc --target %TARGET% --release --bin %BIN_NAME%- - ps: ci\before_deploy.ps1--deploy:- artifact: /.*\.zip/- # TODO update `auth_token.secure`- # - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new- # - Encrypt it. Go to https://ci.appveyor.com/tools/encrypt- # - Paste the output down here- auth_token:- secure: autpm4COsZA3MLAuG8TaCSz4Af5LjSGhd72uVsUPVjDUwANHaeqJAJbel9vyYGfL- description: ""- on:- # TODO Here you can pick which targets will generate binary releases- # In this example, there are some targets that are tested using the stable- # and nightly channels. This condition makes sure there is only one release- # for such targets and that's generated using the stable channel- RUST_VERSION: stable- appveyor_repo_tag: true- provider: GitHub--cache:- - C:\Users\appveyor\.cargo\registry- - target--branches:- only:- # Release tags- - /^v\d+\.\d+\.\d+.*$/- - master--notifications:- - provider: Email- on_build_success: false--# Building is done in the test phase, so we disable Appveyor's build phase.-build: falsediff --git a/ci/before_deploy.ps1 b/ci/before_deploy.ps1deleted file mode 100755index b60bbf51..00000000--- a/ci/before_deploy.ps1+++ /dev/null@@ -1,23 +0,0 @@-# This script takes care of packaging the build artifacts that will go in the-# release zipfile--$SRC_DIR = $pwd.Path-$STAGE = [System.Guid]::NewGuid().ToString()--Set-Location $env:TEMP-New-Item -Type Directory -Name $STAGE-Set-Location $STAGE--$ZIP = "$SRC_DIR\$($env:CRATE_NAME)-$($env:APPVEYOR_REPO_TAG_NAME)-$($env:TARGET).zip"--# TODO Update this to package the right artifacts-Copy-Item "$SRC_DIR\target\$($env:TARGET)\release\$($env:BIN_NAME).exe" '.\'--7z a "$ZIP" *--Push-AppveyorArtifact "$ZIP"--Remove-Item *.* -Force-Set-Location ..-Remove-Item $STAGE-Set-Location $SRC_DIRdiff --git a/ci/before_deploy.sh b/ci/before_deploy.shdeleted file mode 100755index aed6bea8..00000000--- a/ci/before_deploy.sh+++ /dev/null@@ -1,33 +0,0 @@-# This script takes care of building your crate and packaging it for release--set -ex--main() {- local src=$(pwd) \- stage=-- case $TRAVIS_OS_NAME in- linux)- stage=$(mktemp -d)- ;;- osx)- stage=$(mktemp -d -t tmp)- ;;- esac-- test -f Cargo.lock || cargo generate-lockfile-- # TODO Update this to build the artifacts that matter to you- cross rustc --bin check_if_email_exists --target $TARGET --release-- # TODO Update this to package the right artifacts- cp target/$TARGET/release/check_if_email_exists $stage/-- cd $stage- tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *- cd $src-- rm -rf $stage-}--maindiff --git a/ci/build.bash b/ci/build.bashnew file mode 100755index 00000000..5636075d--- /dev/null+++ b/ci/build.bash@@ -0,0 +1,23 @@+#!/usr/bin/env bash+# Script for building your rust projects.+set -e++source ci/common.bash++# $1 {path} = Path to cross/cargo executable+CROSS=$1+# $1 {string} = <Target Triple> e.g. x86_64-pc-windows-msvc+TARGET_TRIPLE=$2+# $3 {boolean} = Are we building for deployment?+RELEASE_BUILD=$3++required_arg $CROSS 'CROSS'+required_arg $TARGET_TRIPLE '<Target Triple>'++if [ -z "$RELEASE_BUILD" ]; then+ $CROSS build --target $TARGET_TRIPLE+ $CROSS build --target $TARGET_TRIPLE --all-features+else+ $CROSS build --target $TARGET_TRIPLE --all-features --release+fi+diff --git a/ci/common.bash b/ci/common.bashnew file mode 100644index 00000000..6b0a21a3--- /dev/null+++ b/ci/common.bash@@ -0,0 +1,6 @@+required_arg() {+ if [ -z "$1" ]; then+ echo "Required argument $2 missing"+ exit 1+ fi+}diff --git a/ci/install.sh b/ci/install.shdeleted file mode 100755index 154e19b2..00000000--- a/ci/install.sh+++ /dev/null@@ -1,49 +0,0 @@-set -ex--main() {- local target=- if [ $TRAVIS_OS_NAME = linux ]; then- target=x86_64-unknown-linux-musl- sort=sort- else- target=x86_64-apple-darwin- sort=gsort # for `sort --sort-version`, from brew's coreutils.- fi-- # Builds for iOS are done on OSX, but require the specific target to be- # installed.- case $TARGET in- aarch64-apple-ios)- rustup target install aarch64-apple-ios- ;;- armv7-apple-ios)- rustup target install armv7-apple-ios- ;;- armv7s-apple-ios)- rustup target install armv7s-apple-ios- ;;- i386-apple-ios)- rustup target install i386-apple-ios- ;;- x86_64-apple-ios)- rustup target install x86_64-apple-ios- ;;- esac-- # This fetches latest stable release- local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \- | cut -d/ -f3 \- | grep -E '^v[0.1.0-9.]+$' \- | $sort --version-sort \- | tail -n1)- # We use v0.1.9 specifically: starting from v0.2.0, Travis errors.- # https://github.com/reacherhq/check-if-email-exists/issues/211- curl -LSfs https://japaric.github.io/trust/install.sh | \- sh -s -- \- --force \- --git japaric/cross \- --tag v0.1.9 \- --target $target-}--maindiff --git a/ci/script.sh b/ci/script.shdeleted file mode 100755index b8dd5f5d..00000000--- a/ci/script.sh+++ /dev/null@@ -1,28 +0,0 @@-# This script takes care of testing your crate--set -ex--# TODO This is the "test phase", tweak it as you see fit-main() {- cross build --target $TARGET- cross build --target $TARGET --release-- if [ ! -z $DISABLE_TESTS ]; then- return- fi-- # FIXME This only works on osx now- # ref: https://github.com/reacherhq/check-if-email-exists/issues/11- if [ $TRAVIS_OS_NAME = osx ]; then- cross test --all --target $TARGET- cross test --all --target $TARGET --release- fi-- cross run --target $TARGET- cross run --target $TARGET --release-}--# we don't run the "test phase" when doing deploys-if [ -z $TRAVIS_TAG ]; then- main-fidiff --git a/ci/set_rust_version.bash b/ci/set_rust_version.bashnew file mode 100755index 00000000..d822cd56--- /dev/null+++ b/ci/set_rust_version.bash@@ -0,0 +1,4 @@+#!/usr/bin/env bash+set -e+rustup default $1+rustup target add $2diff --git a/ci/test.bash b/ci/test.bashnew file mode 100755index 00000000..f85e2483--- /dev/null+++ b/ci/test.bash@@ -0,0 +1,16 @@+#!/usr/bin/env bash+# Script for building your rust projects.+set -e++source ci/common.bash++# $1 {path} = Path to cross/cargo executable+CROSS=$1+# $1 {string} = <Target Triple>+TARGET_TRIPLE=$2++required_arg $CROSS 'CROSS'+required_arg $TARGET_TRIPLE '<Target Triple>'++$CROSS test --target $TARGET_TRIPLE+$CROSS test --target $TARGET_TRIPLE --all-features