Loading .circleci/config.ymldeleted 100644 → 0 +0 −249 Original line number Diff line number Diff line version: 2.1 jobs: linux: parameters: target: type: string library: type: string default: "" dl_path: type: string default: "" version: type: string default: "" vendored: type: boolean default: false no_run: type: boolean default: false image: type: string default: 1.40.0 docker: - image: rust:<< parameters.image >> environment: RUST_BACKTRACE: 1 OPENSSL_DIR: /opt/openssl CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_AR: arm-linux-gnueabihf-ar CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER: qemu-arm-static steps: - checkout - run: apt-get update - run: apt-get remove -y libssl-dev - run: | case "<< parameters.target >>" in "i686-unknown-linux-gnu") apt-get install -y --no-install-recommends gcc-multilib ;; "x86_64-unknown-linux-musl") apt-get install -y --no-install-recommends musl-tools ;; "arm-unknown-linux-gnueabihf") dpkg --add-architecture armhf apt-get update apt-get install -y --no-install-recommends \ gcc-arm-linux-gnueabihf \ libc6-dev:armhf \ qemu-user-static ;; "x86_64-unknown-linux-gnu") exit 0 esac rustup target add << parameters.target >> - unless: condition: << parameters.vendored >> steps: - restore_cache: key: openssl-<< parameters.target >>-<< parameters.library >>-<< parameters.version >> - run: | if [ -d "$OPENSSL_DIR" ]; then exit 0 fi case "<< parameters.library >>" in "libressl") URL="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-<< parameters.version >>.tar.gz" ;; "openssl") URL="https://openssl.org/source<< parameters.dl_path >>/openssl-<< parameters.version >>.tar.gz" ;; esac case "<< parameters.target >>" in "x86_64-unknown-linux-gnu") OS_COMPILER=linux-x86_64 OS_FLAGS="" ;; "i686-unknown-linux-gnu") OS_COMPILER=linux-elf OS_FLAGS=-m32 ;; "arm-unknown-linux-gnueabihf") OS_COMPILER=linux-armv4 OS_FLAGS="" export AR=arm-linux-gnueabihf-ar export CC=arm-linux-gnueabihf-gcc ;; esac mkdir /tmp/build cd /tmp/build curl -L $URL | tar --strip-components=1 -xzf - case "<< parameters.library >>" in "openssl") ./Configure --prefix=$OPENSSL_DIR $OS_COMPILER -fPIC -g $OS_FLAGS no-shared ;; "libressl") ./configure --prefix=$OPENSSL_DIR --disable-shared --with-pic ;; esac make make install_sw - save_cache: key: openssl-<< parameters.target >>-<< parameters.library >>-<< parameters.version >> paths: - /opt/openssl - restore_cache: key: registry - run: cargo generate-lockfile - save_cache: key: registry-{{ .BuildNum }} paths: - /usr/local/cargo/registry/index - restore_cache: key: deps-<< parameters.image >>-<< parameters.target >>-<< parameters.library >>-<< parameters.version >>-{{ checksum "Cargo.lock" }} - run: | cargo build \ --manifest-path=openssl/Cargo.toml \ <<# parameters.vendored >>--features vendored<</ parameters.vendored >> \ --target << parameters.target >> - run: | cargo run \ --manifest-path=systest/Cargo.toml \ <<# parameters.vendored >>--features vendored<</ parameters.vendored >> \ --target << parameters.target >> - run: | cargo test \ --manifest-path=openssl-errors/Cargo.toml \ <<# parameters.vendored >>--features openssl-sys/vendored<</ parameters.vendored >> \ --target << parameters.target >> \ <<# parameters.no_run >>--no-run<</ parameters.no_run >> - run: | ulimit -c unlimited cargo test \ --manifest-path=openssl/Cargo.toml \ <<# parameters.vendored >>--features vendored<</ parameters.vendored >> \ --target << parameters.target >> \ <<# parameters.no_run >>--no-run<</ parameters.no_run >> - save_cache: key: deps-<< parameters.image >>-<< parameters.target >>-<< parameters.library >>-<< parameters.version >>-{{ checksum "Cargo.lock" }} paths: - /usr/local/cargo/registry/cache - target - run: command: | mkdir -p /tmp/core_dumps find . -name "core.*" -exec cp \{\} /tmp/core_dumps \; cp target/<< parameters.target >>/debug/openssl-* /tmp/core_dumps when: on_fail - store_artifacts: path: /tmp/core_dumps openssl_111: &openssl_111 library: openssl version: 1.1.1i openssl_110: &openssl_110 library: openssl version: 1.1.0l dl_path: /old/1.1.0 openssl_102: &openssl_102 library: openssl version: 1.0.2u dl_path: /old/1.0.2 openssl_101: &openssl_101 library: openssl version: 1.0.1u dl_path: /old/1.0.1 workflows: test: jobs: - linux: name: musl-vendored target: x86_64-unknown-linux-musl vendored: true - linux: name: x86_64-vendored target: x86_64-unknown-linux-gnu vendored: true - linux: <<: *openssl_111 name: x86_64-openssl-1.1.1 target: x86_64-unknown-linux-gnu - linux: <<: *openssl_110 name: x86_64-openssl-1.1.0 target: x86_64-unknown-linux-gnu - linux: <<: *openssl_102 name: x86_64-openssl-1.0.2 target: x86_64-unknown-linux-gnu - linux: <<: *openssl_101 name: x86_64-openssl-1.0.1 target: x86_64-unknown-linux-gnu - linux: name: i686-vendored target: i686-unknown-linux-gnu vendored: true - linux: <<: *openssl_111 name: i686-openssl-1.1.1 target: i686-unknown-linux-gnu - linux: <<: *openssl_110 name: i686-openssl-1.1.0 target: i686-unknown-linux-gnu - linux: <<: *openssl_102 name: i686-openssl-1.0.2 target: i686-unknown-linux-gnu - linux: name: armhf-vendored target: arm-unknown-linux-gnueabihf vendored: true no_run: true - linux: <<: *openssl_111 name: armhf-openssl-1.1.1 target: arm-unknown-linux-gnueabihf no_run: true - linux: <<: *openssl_110 name: armhf-openssl-1.1.0 target: arm-unknown-linux-gnueabihf no_run: true - linux: <<: *openssl_102 name: armhf-openssl-1.0.2 target: arm-unknown-linux-gnueabihf no_run: true - linux: name: x86_64-libressl-2.5 target: x86_64-unknown-linux-gnu library: libressl version: 2.5.5 - linux: name: x86_64-libressl-3.3.1 target: x86_64-unknown-linux-gnu library: libressl version: 3.3.1 .github/workflows/ci.yml +144 −54 Original line number Diff line number Diff line Loading @@ -27,32 +27,25 @@ jobs: steps: - uses: actions/checkout@v2 - uses: sfackler/actions/rustup@master - name: Get rust version - run: echo "::set-output name=version::$(rustc --version)" id: rust-version run: echo "::set-output name=version::$(rustc --version)" - name: Cache cargo index uses: actions/cache@v1 - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - name: Create lockfile run: cargo generate-lockfile - name: Cache cargo registry uses: actions/cache@v1 - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Fetch dependencies run: cargo fetch - name: Cache target directory uses: actions/cache@v1 - run: cargo fetch - uses: actions/cache@v1 with: path: target key: clippy-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Run clippy run: cargo clippy --all --all-targets key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo clippy --all --all-targets min-version: name: min-version Loading @@ -60,32 +53,25 @@ jobs: steps: - uses: actions/checkout@v2 - uses: sfackler/actions/rustup@master - name: Get rust version - run: echo "::set-output name=version::$(rustc --version)" id: rust-version run: echo "::set-output name=version::$(rustc --version)" - name: Cache cargo index uses: actions/cache@v1 - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - name: Create lockfile run: cargo generate-lockfile - name: Cache cargo registry uses: actions/cache@v1 - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Fetch dependencies run: cargo fetch - name: Cache target directory uses: actions/cache@v1 - run: cargo fetch - uses: actions/cache@v1 with: path: target key: min-version-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Check openssl run: cargo check -p openssl key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo check -p openssl windows-vcpkg: name: windows-vcpkg Loading @@ -95,40 +81,29 @@ jobs: steps: - uses: actions/checkout@v2 - uses: sfackler/actions/rustup@master - name: Get rust version - run: echo "::set-output name=version::$(rustc --version)" id: rust-version run: echo "::set-output name=version::$(rustc --version)" - name: Set vcpkg root run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append - name: Install OpenSSL run: vcpkg install openssl:x64-windows - name: Cache cargo index uses: actions/cache@v1 - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append - run: vcpkg install openssl:x64-windows - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - name: Create lockfile run: cargo generate-lockfile - name: Cache cargo registry uses: actions/cache@v1 - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Fetch dependencies run: cargo fetch - name: Cache target directory uses: actions/cache@v1 - run: cargo fetch - uses: actions/cache@v1 with: path: target key: min-version-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Run systest run: cargo run -p systest - name: Test openssl run: cargo test -p openssl - name: Test openssl-errors run: cargo test -p openssl-errors key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo run -p systest - run: cargo test -p openssl - run: cargo test -p openssl-errors macos-homebrew: name: macos-homebrew Loading @@ -153,7 +128,122 @@ jobs: - uses: actions/cache@v1 with: path: target key: target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo run -p systest - run: cargo test -p openssl - run: cargo test -p openssl-errors linux: strategy: matrix: arch: - target: x86_64-unknown-linux-gnu run: true - target: i686-unknown-linux-gnu run: true - target: arm-unknown-linux-gnueabihf run: false library: - name: openssl version: vendored - name: openssl version: 1.1.1j dl-path: / - name: openssl version: 1.1.0l dl-path: /old - name: openssl version: 1.0.2u dl-path: /old - name: openssl version: 1.0.1u dl-path: /old include: - arch: target: x86_64-unknown-linux-gnu run: true library: name: libressl version: 2.5.5 - arch: target: x86_64-unknown-linux-gnu run: true library: name: libressl version: 3.3.1 name: ${{ matrix.arch.target }}-${{ matrix.library.name }}-${{ matrix.library.version }} runs-on: ubuntu-latest env: OPENSSL_DIR: /opt/openssl CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_AR: arm-linux-gnueabihf-ar CARGO_TARGET_ARM_UNKNOWN_LINUX_GNU_EABIHF_RUNNER: qemu-arm -L /usr/arm/arm-linux-gnueabihf steps: - uses: actions/checkout@v2 - uses: sfackler/actions/rustup@master - run: rustup target add ${{ matrix.arch.target }} - run: | case "${{ matrix.arch.target }}" in "x86_64-unknown-linux-gnu") exit 0 ;; "i686-unknown-linux-gnu") packages="gcc-multilib" ;; "arm-unknown-linux-gnueabihf") package="gcc-arm-linux-gnueabihf qemu-user" ;; esac sudo apt-get update sudo apt-get install -y $packages - uses: actions/cache@v2 with: path: /opt/openssl key: openssl-${{ matrix.arch.target }}-${{ matrix.library.name }}-${{ matrix.library.version }} if: matrix.library.version != 'vendored' id: openssl-cache - run: | case "${{ matrix.library.name }}" in "openssl") url="https://openssl.org/source${{ matrix.library.dl-path }}/openssl-${{ matrix.library.version }}.tar.gz" ;; "libressl") url="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${{ matrix.library.version }}.tar.gz" ;; esac case "${{ matrix.arch.target}}" in "x86_64-unknown-linux-gnu") OS_COMPILER=linux-x86_64 OS_FLAGS="" ;; "i686-unknown-linux-gnu") OS_COMPILER=linux-elf OS_FLAGS=-m32 ;; "arm-unknown-linux-gnueabihf") OS_COMPILER=linux-armv4 OS_FLAGS="" export AR=arm-linux-gnueabihf-ar export CC=arm-linux-gnueabihf-gcc ;; esac mkdir /tmp/build cd /tmp/build curl -L $url | tar --strip-components=1 -xzf - case "${{ matrix.library.name }}" in "openssl") ./Configure --prefix=$OPENSSL_DIR $OS_COMPILER -fPIC -g $OS_FLAGS no-shared ;; "libressl") ./configure --prefix=$OPENSSL_DIR --disable-shared --with-pic ;; esac make make install_sw if: matrix.library.version != 'vendored' && !steps.openssl-cache.outputs.cache-hit Loading
.circleci/config.ymldeleted 100644 → 0 +0 −249 Original line number Diff line number Diff line version: 2.1 jobs: linux: parameters: target: type: string library: type: string default: "" dl_path: type: string default: "" version: type: string default: "" vendored: type: boolean default: false no_run: type: boolean default: false image: type: string default: 1.40.0 docker: - image: rust:<< parameters.image >> environment: RUST_BACKTRACE: 1 OPENSSL_DIR: /opt/openssl CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_AR: arm-linux-gnueabihf-ar CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER: qemu-arm-static steps: - checkout - run: apt-get update - run: apt-get remove -y libssl-dev - run: | case "<< parameters.target >>" in "i686-unknown-linux-gnu") apt-get install -y --no-install-recommends gcc-multilib ;; "x86_64-unknown-linux-musl") apt-get install -y --no-install-recommends musl-tools ;; "arm-unknown-linux-gnueabihf") dpkg --add-architecture armhf apt-get update apt-get install -y --no-install-recommends \ gcc-arm-linux-gnueabihf \ libc6-dev:armhf \ qemu-user-static ;; "x86_64-unknown-linux-gnu") exit 0 esac rustup target add << parameters.target >> - unless: condition: << parameters.vendored >> steps: - restore_cache: key: openssl-<< parameters.target >>-<< parameters.library >>-<< parameters.version >> - run: | if [ -d "$OPENSSL_DIR" ]; then exit 0 fi case "<< parameters.library >>" in "libressl") URL="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-<< parameters.version >>.tar.gz" ;; "openssl") URL="https://openssl.org/source<< parameters.dl_path >>/openssl-<< parameters.version >>.tar.gz" ;; esac case "<< parameters.target >>" in "x86_64-unknown-linux-gnu") OS_COMPILER=linux-x86_64 OS_FLAGS="" ;; "i686-unknown-linux-gnu") OS_COMPILER=linux-elf OS_FLAGS=-m32 ;; "arm-unknown-linux-gnueabihf") OS_COMPILER=linux-armv4 OS_FLAGS="" export AR=arm-linux-gnueabihf-ar export CC=arm-linux-gnueabihf-gcc ;; esac mkdir /tmp/build cd /tmp/build curl -L $URL | tar --strip-components=1 -xzf - case "<< parameters.library >>" in "openssl") ./Configure --prefix=$OPENSSL_DIR $OS_COMPILER -fPIC -g $OS_FLAGS no-shared ;; "libressl") ./configure --prefix=$OPENSSL_DIR --disable-shared --with-pic ;; esac make make install_sw - save_cache: key: openssl-<< parameters.target >>-<< parameters.library >>-<< parameters.version >> paths: - /opt/openssl - restore_cache: key: registry - run: cargo generate-lockfile - save_cache: key: registry-{{ .BuildNum }} paths: - /usr/local/cargo/registry/index - restore_cache: key: deps-<< parameters.image >>-<< parameters.target >>-<< parameters.library >>-<< parameters.version >>-{{ checksum "Cargo.lock" }} - run: | cargo build \ --manifest-path=openssl/Cargo.toml \ <<# parameters.vendored >>--features vendored<</ parameters.vendored >> \ --target << parameters.target >> - run: | cargo run \ --manifest-path=systest/Cargo.toml \ <<# parameters.vendored >>--features vendored<</ parameters.vendored >> \ --target << parameters.target >> - run: | cargo test \ --manifest-path=openssl-errors/Cargo.toml \ <<# parameters.vendored >>--features openssl-sys/vendored<</ parameters.vendored >> \ --target << parameters.target >> \ <<# parameters.no_run >>--no-run<</ parameters.no_run >> - run: | ulimit -c unlimited cargo test \ --manifest-path=openssl/Cargo.toml \ <<# parameters.vendored >>--features vendored<</ parameters.vendored >> \ --target << parameters.target >> \ <<# parameters.no_run >>--no-run<</ parameters.no_run >> - save_cache: key: deps-<< parameters.image >>-<< parameters.target >>-<< parameters.library >>-<< parameters.version >>-{{ checksum "Cargo.lock" }} paths: - /usr/local/cargo/registry/cache - target - run: command: | mkdir -p /tmp/core_dumps find . -name "core.*" -exec cp \{\} /tmp/core_dumps \; cp target/<< parameters.target >>/debug/openssl-* /tmp/core_dumps when: on_fail - store_artifacts: path: /tmp/core_dumps openssl_111: &openssl_111 library: openssl version: 1.1.1i openssl_110: &openssl_110 library: openssl version: 1.1.0l dl_path: /old/1.1.0 openssl_102: &openssl_102 library: openssl version: 1.0.2u dl_path: /old/1.0.2 openssl_101: &openssl_101 library: openssl version: 1.0.1u dl_path: /old/1.0.1 workflows: test: jobs: - linux: name: musl-vendored target: x86_64-unknown-linux-musl vendored: true - linux: name: x86_64-vendored target: x86_64-unknown-linux-gnu vendored: true - linux: <<: *openssl_111 name: x86_64-openssl-1.1.1 target: x86_64-unknown-linux-gnu - linux: <<: *openssl_110 name: x86_64-openssl-1.1.0 target: x86_64-unknown-linux-gnu - linux: <<: *openssl_102 name: x86_64-openssl-1.0.2 target: x86_64-unknown-linux-gnu - linux: <<: *openssl_101 name: x86_64-openssl-1.0.1 target: x86_64-unknown-linux-gnu - linux: name: i686-vendored target: i686-unknown-linux-gnu vendored: true - linux: <<: *openssl_111 name: i686-openssl-1.1.1 target: i686-unknown-linux-gnu - linux: <<: *openssl_110 name: i686-openssl-1.1.0 target: i686-unknown-linux-gnu - linux: <<: *openssl_102 name: i686-openssl-1.0.2 target: i686-unknown-linux-gnu - linux: name: armhf-vendored target: arm-unknown-linux-gnueabihf vendored: true no_run: true - linux: <<: *openssl_111 name: armhf-openssl-1.1.1 target: arm-unknown-linux-gnueabihf no_run: true - linux: <<: *openssl_110 name: armhf-openssl-1.1.0 target: arm-unknown-linux-gnueabihf no_run: true - linux: <<: *openssl_102 name: armhf-openssl-1.0.2 target: arm-unknown-linux-gnueabihf no_run: true - linux: name: x86_64-libressl-2.5 target: x86_64-unknown-linux-gnu library: libressl version: 2.5.5 - linux: name: x86_64-libressl-3.3.1 target: x86_64-unknown-linux-gnu library: libressl version: 3.3.1
.github/workflows/ci.yml +144 −54 Original line number Diff line number Diff line Loading @@ -27,32 +27,25 @@ jobs: steps: - uses: actions/checkout@v2 - uses: sfackler/actions/rustup@master - name: Get rust version - run: echo "::set-output name=version::$(rustc --version)" id: rust-version run: echo "::set-output name=version::$(rustc --version)" - name: Cache cargo index uses: actions/cache@v1 - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - name: Create lockfile run: cargo generate-lockfile - name: Cache cargo registry uses: actions/cache@v1 - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Fetch dependencies run: cargo fetch - name: Cache target directory uses: actions/cache@v1 - run: cargo fetch - uses: actions/cache@v1 with: path: target key: clippy-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Run clippy run: cargo clippy --all --all-targets key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo clippy --all --all-targets min-version: name: min-version Loading @@ -60,32 +53,25 @@ jobs: steps: - uses: actions/checkout@v2 - uses: sfackler/actions/rustup@master - name: Get rust version - run: echo "::set-output name=version::$(rustc --version)" id: rust-version run: echo "::set-output name=version::$(rustc --version)" - name: Cache cargo index uses: actions/cache@v1 - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - name: Create lockfile run: cargo generate-lockfile - name: Cache cargo registry uses: actions/cache@v1 - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Fetch dependencies run: cargo fetch - name: Cache target directory uses: actions/cache@v1 - run: cargo fetch - uses: actions/cache@v1 with: path: target key: min-version-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Check openssl run: cargo check -p openssl key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo check -p openssl windows-vcpkg: name: windows-vcpkg Loading @@ -95,40 +81,29 @@ jobs: steps: - uses: actions/checkout@v2 - uses: sfackler/actions/rustup@master - name: Get rust version - run: echo "::set-output name=version::$(rustc --version)" id: rust-version run: echo "::set-output name=version::$(rustc --version)" - name: Set vcpkg root run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append - name: Install OpenSSL run: vcpkg install openssl:x64-windows - name: Cache cargo index uses: actions/cache@v1 - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append - run: vcpkg install openssl:x64-windows - uses: actions/cache@v1 with: path: ~/.cargo/registry/index key: index-${{ runner.os }}-${{ github.run_number }} restore-keys: | index-${{ runner.os }}- - name: Create lockfile run: cargo generate-lockfile - name: Cache cargo registry uses: actions/cache@v1 - run: cargo generate-lockfile - uses: actions/cache@v1 with: path: ~/.cargo/registry/cache key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Fetch dependencies run: cargo fetch - name: Cache target directory uses: actions/cache@v1 - run: cargo fetch - uses: actions/cache@v1 with: path: target key: min-version-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - name: Run systest run: cargo run -p systest - name: Test openssl run: cargo test -p openssl - name: Test openssl-errors run: cargo test -p openssl-errors key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo run -p systest - run: cargo test -p openssl - run: cargo test -p openssl-errors macos-homebrew: name: macos-homebrew Loading @@ -153,7 +128,122 @@ jobs: - uses: actions/cache@v1 with: path: target key: target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} key: target-${{ github.job }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - run: cargo run -p systest - run: cargo test -p openssl - run: cargo test -p openssl-errors linux: strategy: matrix: arch: - target: x86_64-unknown-linux-gnu run: true - target: i686-unknown-linux-gnu run: true - target: arm-unknown-linux-gnueabihf run: false library: - name: openssl version: vendored - name: openssl version: 1.1.1j dl-path: / - name: openssl version: 1.1.0l dl-path: /old - name: openssl version: 1.0.2u dl-path: /old - name: openssl version: 1.0.1u dl-path: /old include: - arch: target: x86_64-unknown-linux-gnu run: true library: name: libressl version: 2.5.5 - arch: target: x86_64-unknown-linux-gnu run: true library: name: libressl version: 3.3.1 name: ${{ matrix.arch.target }}-${{ matrix.library.name }}-${{ matrix.library.version }} runs-on: ubuntu-latest env: OPENSSL_DIR: /opt/openssl CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_AR: arm-linux-gnueabihf-ar CARGO_TARGET_ARM_UNKNOWN_LINUX_GNU_EABIHF_RUNNER: qemu-arm -L /usr/arm/arm-linux-gnueabihf steps: - uses: actions/checkout@v2 - uses: sfackler/actions/rustup@master - run: rustup target add ${{ matrix.arch.target }} - run: | case "${{ matrix.arch.target }}" in "x86_64-unknown-linux-gnu") exit 0 ;; "i686-unknown-linux-gnu") packages="gcc-multilib" ;; "arm-unknown-linux-gnueabihf") package="gcc-arm-linux-gnueabihf qemu-user" ;; esac sudo apt-get update sudo apt-get install -y $packages - uses: actions/cache@v2 with: path: /opt/openssl key: openssl-${{ matrix.arch.target }}-${{ matrix.library.name }}-${{ matrix.library.version }} if: matrix.library.version != 'vendored' id: openssl-cache - run: | case "${{ matrix.library.name }}" in "openssl") url="https://openssl.org/source${{ matrix.library.dl-path }}/openssl-${{ matrix.library.version }}.tar.gz" ;; "libressl") url="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${{ matrix.library.version }}.tar.gz" ;; esac case "${{ matrix.arch.target}}" in "x86_64-unknown-linux-gnu") OS_COMPILER=linux-x86_64 OS_FLAGS="" ;; "i686-unknown-linux-gnu") OS_COMPILER=linux-elf OS_FLAGS=-m32 ;; "arm-unknown-linux-gnueabihf") OS_COMPILER=linux-armv4 OS_FLAGS="" export AR=arm-linux-gnueabihf-ar export CC=arm-linux-gnueabihf-gcc ;; esac mkdir /tmp/build cd /tmp/build curl -L $url | tar --strip-components=1 -xzf - case "${{ matrix.library.name }}" in "openssl") ./Configure --prefix=$OPENSSL_DIR $OS_COMPILER -fPIC -g $OS_FLAGS no-shared ;; "libressl") ./configure --prefix=$OPENSSL_DIR --disable-shared --with-pic ;; esac make make install_sw if: matrix.library.version != 'vendored' && !steps.openssl-cache.outputs.cache-hit