Skip to content

Commit

Permalink
fix: exclude libtor from windows build (#4631)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbondi authored Sep 8, 2022
1 parent c7c9075 commit dffea23
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/base_node_binaries.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"target": "x86_64-pc-windows-msvc",
"cross": false,
"target_cpu": "x86-64",
"features": "safe"
"features": "safe",
"flags": "--workspace --exclude tari_libtor"
},
{
"name": "windows-arm64",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/base_node_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ jobs:
with:
use-cross: ${{ matrix.builds.cross }}
command: build
args: --release --target ${{ matrix.builds.target }} --features ${{ matrix.builds.features }} ${{ matrix.builds.target_bins }} --locked
args: --release --target ${{ matrix.builds.target }} --features ${{ matrix.builds.features }} ${{ matrix.builds.target_bins }} ${{ matrix.builds.flags }} --locked

- name: Copy binaries to folder for zipping
shell: bash
Expand Down
5 changes: 1 addition & 4 deletions infrastructure/libtor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@ multiaddr = { version = "0.14.0" }
rand = "0.8"
tempfile = "3.1.0"
tor-hash-passwd = "1.0.1"

[target.'cfg(unix)'.dependencies]
tari_shutdown = { version = "^0.38", path = "../shutdown"}
libtor = { version = "46.9.0", optional = true }
libtor = "46.9.0"
6 changes: 5 additions & 1 deletion infrastructure/libtor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#[cfg(unix)]
// For some inexplicable reason if we don't include extern crate then we get libtor not defined errors in this crate on
// matrix builds
#[allow(unused_extern_crates)]
extern crate libtor;

pub mod tor;

0 comments on commit dffea23

Please sign in to comment.