<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ci/fetch-smoke-test.sh - fork/cargo @ 0.88.0</title>
<meta name="description" content="ci/fetch-smoke-test.sh in fork/cargo at 0.88.0.">
<meta property="og:title" content="ci/fetch-smoke-test.sh - fork/cargo @ 0.88.0">
<meta property="og:description" content="ci/fetch-smoke-test.sh in fork/cargo at 0.88.0.">
<meta property="og:type" content="website">
<meta property="og:site_name" content="git.julia.blue">
<link rel="stylesheet" href="/css/style.css?v=62">
<script type="module" src="/js/main.js?v=62"></script>
</head>
<body>
<main data-ref="0.88.0" data-tip="99624be96e9d213b0e9b1e36451271f24e4a41d8">
<noscript>
  <div class="callout">
    <p>
      hey! this is a static git repo viewer. commit diffs, file history,
      older commits and other revisions won't load without javascript.
    </p>
    <p>
      you are still able to view source files on branch/tag tips,
      but the experience is degraded.
    </p>
  </div>
</noscript>
<header class="repo"><div>
<h1>fork/cargo</h1>
</div>
<pre class="clone">git clone https://git.julia.blue/fork/cargo</pre>
</header>
<p class="snapshot-commit"><span class="commit-author">bors</span><span class="commit-message" data-commit="791455498318a8765e3a9708ef651528ca71a5e9">Auto merge of #9921 - ehuss:fetch-smoke, r=alexcrichton</span><span class="snapshot-sha sha" data-commit="791455498318a8765e3a9708ef651528ca71a5e9">791455498</span><time datetime="2021-09-22T13:45:01+00:00" title="2021-09-22 13:45:01 +0000">2021-09-22</time></p>
<header class="topbar"><details class="switcher"><summary>0.88.0</summary><div class="menu"><strong>branches</strong><a href="/fork/cargo/ref/master/">master</a><strong>tags</strong><a href="/fork/cargo/ref/0.87.0/">0.87.0</a><a class="current" href="/fork/cargo/ref/0.88.0/">0.88.0</a><a href="/fork/cargo/ref/0.89.0/">0.89.0</a><a href="/fork/cargo/ref/0.90.0/">0.90.0</a><a href="/fork/cargo/ref/0.91.0/">0.91.0</a><a href="/fork/cargo/ref/0.92.0/">0.92.0</a><a href="/fork/cargo/ref/0.93.0/">0.93.0</a><a href="/fork/cargo/ref/home-0.5.12/">home-0.5.12</a><a class="all" href="/fork/cargo/refs">all refs →</a></div></details><nav class="crumbs"><a href="/fork/cargo/">cargo</a> / <a href="/fork/cargo/ref/0.88.0/tree/ci/">ci</a> / <span class="cur">fetch-smoke-test.sh</span></nav>
<span class="view-stats"><span>597 B</span><span>27 lines</span></span><span class="actions"><a class="raw" href="/fork/cargo/raw/17993d1fdb707f45daec8dd6b5b030bf9fa82dc3/ci/fetch-smoke-test.sh">raw</a></span></header>
<pre class="code src language-bash"><span class="code-line"><a class="ln" id="L1" href="#L1">1</a><span class="code-text"><a-c>#!/bin/bash</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L2" href="#L2">2</a><span class="code-text"><a-c># This script builds with static curl, and verifies that fetching works.</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L3" href="#L3">3</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L4" href="#L4">4</a><span class="code-text"><a-f>set</a-f> <a-co>-ex</a-co></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L5" href="#L5">5</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L6" href="#L6">6</a><span class="code-text"><a-k>if</a-k> [[ -z <a-s>&quot;</a-s><a-o>$</a-o><a-pr>RUNNER_TEMP</a-pr><a-s>&quot;</a-s> ]]</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L7" href="#L7">7</a><span class="code-text"><a-k>then</a-k></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L8" href="#L8">8</a><span class="code-text">    <a-f>echo</a-f> <a-s>&quot;RUNNER_TEMP must be set&quot;</a-s></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L9" href="#L9">9</a><span class="code-text">    <a-f>exit</a-f> 1</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L10" href="#L10">10</a><span class="code-text"><a-k>fi</a-k></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L11" href="#L11">11</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L12" href="#L12">12</a><span class="code-text"><a-k>if</a-k> [ ! -f Cargo.toml ]; <a-k>then</a-k></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L13" href="#L13">13</a><span class="code-text">    <a-f>echo</a-f> <a-s>&quot;Must be run from root of project.&quot;</a-s></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L14" href="#L14">14</a><span class="code-text">    <a-f>exit</a-f> 1</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L15" href="#L15">15</a><span class="code-text"><a-k>fi</a-k></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L16" href="#L16">16</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L17" href="#L17">17</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L18" href="#L18">18</a><span class="code-text"><a-c># Building openssl on Windows is a pain.</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L19" href="#L19">19</a><span class="code-text"><a-k>if</a-k> [[ <a-eb>$(</a-eb><a-f>rustc</a-f><a-eb> </a-eb><a-co>-Vv</a-co><a-eb> </a-eb><a-o>|</a-o><a-eb> </a-eb><a-f>grep</a-f><a-eb> host:)</a-eb> != *windows* ]]; <a-k>then</a-k></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L20" href="#L20">20</a><span class="code-text">    <a-pr>FEATURES</a-pr>=<a-s>&#39;vendored-openssl,curl-sys/static-curl,curl-sys/force-system-lib-on-osx&#39;</a-s></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L21" href="#L21">21</a><span class="code-text">    <a-k>export</a-k> <a-pr>LIBZ_SYS_STATIC</a-pr>=1</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L22" href="#L22">22</a><span class="code-text"><a-k>fi</a-k></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L23" href="#L23">23</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L24" href="#L24">24</a><span class="code-text"><a-f>cargo</a-f> build <a-co>--features</a-co> <a-s>&quot;</a-s><a-o>$</a-o><a-pr>FEATURES</a-pr><a-s>&quot;</a-s></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L25" href="#L25">25</a><span class="code-text"><a-k>export</a-k> <a-pr>CARGO_HOME</a-pr>=<a-o>$</a-o><a-pr>RUNNER_TEMP</a-pr>/chome</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L26" href="#L26">26</a><span class="code-text"><a-f>target/debug/cargo</a-f> fetch</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L27" href="#L27">27</a><span class="code-text"><a-f>rm</a-f> <a-co>-rf</a-co> <a-o>$</a-o><a-pr>CARGO_HOME</a-pr></span></span></pre>
</main>
</body>
</html>
