Skip to content

Commit

Permalink
Merge pull request #1092 from pkgw/openssl3
Browse files Browse the repository at this point in the history
Update CI builds to Ubuntu 22.04 / OpenSSL 3
  • Loading branch information
pkgw authored Sep 17, 2023
2 parents 730d730 + 9a365a5 commit 41168a9
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 70 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,28 +138,31 @@ overlay-triplets-path = "dist/vcpkg-triplets"
# add them to crates/dep_support/src/lib.rs:new_from_vcpkg() to give users
# guidance if they might need to set $VCPKGRS_TRIPLET.
[package.metadata.vcpkg.target]
x86_64-apple-darwin = { install = ["freetype", "harfbuzz[icu,graphite2]"] }
x86_64-apple-darwin = { install = ["freetype", "harfbuzz[graphite2]", "icu"] }
aarch64-apple-darwin = { triplet = "arm64-osx", install = [
"freetype",
"harfbuzz[icu,graphite2]",
"harfbuzz[graphite2]",
"icu",
] }
x86_64-unknown-linux-gnu = { install = [
"fontconfig",
"freetype",
"harfbuzz[icu,graphite2]",
"harfbuzz[graphite2]",
"icu",
] }
x86_64-pc-windows-msvc = { triplet = "x64-windows-static-release", install = [
"fontconfig",
"freetype",
"harfbuzz[icu,graphite2]",
"harfbuzz[graphite2]",
"icu",
] }

[package.metadata.internal_dep_versions]
tectonic_bridge_core = "thiscommit:2023-06-11:PvhF7YB"
tectonic_bridge_flate = "thiscommit:2021-01-01:eer4ahL4"
tectonic_bridge_graphite2 = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
tectonic_bridge_harfbuzz = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
tectonic_bridge_icu = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
tectonic_bridge_harfbuzz = "thiscommit:2023-09-17:FZwRtUP"
tectonic_bridge_icu = "thiscommit:2023-09-17:AwTXf3W"
tectonic_bundles = "thiscommit:2022-03-29:SFnXSaL"
tectonic_cfg_support = "thiscommit:aeRoo7oa"
tectonic_dep_support = "5faf4205bdd3d31101b749fc32857dd746f9e5bc"
Expand Down
6 changes: 2 additions & 4 deletions crates/bridge_harfbuzz/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2020-2021 the Tectonic Project
# Copyright 2020-2023 the Tectonic Project
# Licensed under the MIT License.

# See README.md for discussion of features (or lack thereof) in this crate.

[package]
name = "tectonic_bridge_harfbuzz"
version = "0.0.0-dev.0" # assigned with cranko (see README)
version = "0.0.0-dev.0" # assigned with cranko (see README)
authors = ["Peter Williams <[email protected]>"]
description = """
Expose the Harfbuzz C/C++ APIs to Rust/Cargo.
Expand All @@ -21,7 +21,6 @@ exclude = ["/harfbuzz/docs/", "/harfbuzz/perf/", "/harfbuzz/test/"]

[dependencies]
tectonic_bridge_graphite2 = { path = "../bridge_graphite2", version = "0.0.0-dev.0" }
tectonic_bridge_icu = { path = "../bridge_icu", version = "0.0.0-dev.0" }

[build-dependencies]
cc = "^1.0.66"
Expand All @@ -32,5 +31,4 @@ external-harfbuzz = []

[package.metadata.internal_dep_versions]
tectonic_bridge_graphite2 = "2722731f9e32c6963fe8c8566a201b33672c5c5a"
tectonic_bridge_icu = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
tectonic_dep_support = "5faf4205bdd3d31101b749fc32857dd746f9e5bc"
29 changes: 13 additions & 16 deletions crates/bridge_harfbuzz/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 the Tectonic Project
// Copyright 2020-2023 the Tectonic Project
// Licensed under the MIT License.

//! Harfbuzz build script.
Expand All @@ -7,15 +7,23 @@
mod inner {
use tectonic_dep_support::{Configuration, Dependency, Spec};

// TODO: ICU not necessary if Harfbuzz >= 2.5.
struct HarfbuzzSpec;

impl Spec for HarfbuzzSpec {
// We require Harfbuzz >= 1.4, but that version is ancient, and
// specifying the version constraint in this string causes problems with
// the `pkgconf` implementation of pkg-config on Windows/MSYS2.
// (Specifically, its `--modversion` mode won't print anything out when
// given two arguments, causing an unhandled crash inside the pkg_config
// Rust library.) Likewise, for Harfbuzz < 2.5, the `harfbuzz-icu`
// pkg-config item is needed, but this may also cause problems for
// pkgconf. If you really need to compile against very old Harfbuzz,
// patch this file and don't use pkgconf.
fn get_pkgconfig_spec(&self) -> &str {
"harfbuzz >= 1.4 harfbuzz-icu"
"harfbuzz"
}

// TODO: can we ensure that the ICU and graphite2 options are enabled?
// TODO: can we ensure that the graphite2 option is enabled?
fn get_vcpkg_spec(&self) -> &[&str] {
&["harfbuzz"]
}
Expand Down Expand Up @@ -75,26 +83,19 @@ mod inner {
// Include paths exported by our internal dependencies:
let graphite2_include_path = env::var("DEP_GRAPHITE2_INCLUDE_PATH").unwrap();
let graphite2_static = !env::var("DEP_GRAPHITE2_DEFINE_STATIC").unwrap().is_empty();
let icu_include_path = env::var("DEP_ICUUC_INCLUDE_PATH").unwrap();

let mut cfg = cc::Build::new();

cfg.cpp(true)
.flag("-std=c++11")
.warnings(false)
.define("HAVE_GRAPHITE2", "1")
.define("HAVE_ICU", "1")
.file("harfbuzz/src/harfbuzz.cc")
.file("harfbuzz/src/hb-icu.cc");
.file("harfbuzz/src/harfbuzz.cc");

for item in graphite2_include_path.split(';') {
cfg.include(item);
}

for item in icu_include_path.split(';') {
cfg.include(item);
}

if graphite2_static {
cfg.define("GRAPHITE2_STATIC", "1");
}
Expand Down Expand Up @@ -129,10 +130,6 @@ mod inner {
print!(";{}", item);
}

for item in icu_include_path.split(';') {
print!(";{}", item);
}

println!();

let dest_dir = include_dir.join("harfbuzz");
Expand Down
5 changes: 1 addition & 4 deletions crates/bridge_harfbuzz/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 the Tectonic Project
// Copyright 2020-2023 the Tectonic Project
// Licensed under the MIT License.

//! No Rust code. This crate exists to export the Harfbuzz *C/C++* API into the
Expand All @@ -9,7 +9,4 @@
mod linkage {
#[allow(unused_imports)]
use tectonic_bridge_graphite2 as clippyrenamehack1;

#[allow(unused_imports)]
use tectonic_bridge_icu as clippyrenamehack2;
}
13 changes: 12 additions & 1 deletion crates/bridge_icu/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//! this crate is needed. Vendoring the ICU library is almost certainly not
//! something that one should do.
use tectonic_dep_support::{Configuration, Dependency, Spec};
use tectonic_dep_support::{Backend, Configuration, Dependency, Spec};

struct IcuSpec;

Expand All @@ -22,6 +22,7 @@ impl Spec for IcuSpec {
}

fn main() {
let target = std::env::var("TARGET").unwrap();
let cfg = Configuration::default();
let dep = Dependency::probe(IcuSpec, &cfg);

Expand All @@ -39,4 +40,14 @@ fn main() {
println!();

dep.emit();

// vcpkg-rs is not guaranteed to emit libraries in the order required by a
// single-pass linker, so we might need to make sure that's done right.

if cfg.backend == Backend::Vcpkg && target.contains("-linux-") {
// add icudata to the end of the list of libs as vcpkg-rs
// does not order individual libraries as a single pass
// linker requires.
println!("cargo:rustc-link-lib=icudata");
}
}
4 changes: 2 additions & 2 deletions crates/xetex_layout/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[package]
name = "tectonic_xetex_layout"
version = "0.0.0-dev.0" # assigned with cranko (see README)
version = "0.0.0-dev.0" # assigned with cranko (see README)
authors = ["Peter Williams <[email protected]>"]
description = """
XeTeX's font loading and layout interface encapsulation, as a crate.
Expand Down Expand Up @@ -38,6 +38,6 @@ tectonic_bridge_core = "thiscommit:2021-01-16:wie2Ejoh"
tectonic_bridge_graphite2 = "2722731f9e32c6963fe8c8566a201b33672c5c5a"
tectonic_bridge_freetype2 = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
tectonic_bridge_harfbuzz = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
tectonic_bridge_icu = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
tectonic_bridge_icu = "thiscommit:2023-09-17:6uIZ4lA"
tectonic_cfg_support = "thiscommit:aeRoo7oa"
tectonic_dep_support = "5faf4205bdd3d31101b749fc32857dd746f9e5bc"
12 changes: 1 addition & 11 deletions crates/xetex_layout/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::{
path::{Path, PathBuf},
};
use tectonic_cfg_support::target_cfg;
use tectonic_dep_support::{Backend, Configuration, Dependency, Spec};
use tectonic_dep_support::{Configuration, Dependency, Spec};

struct FontconfigSpec;

Expand Down Expand Up @@ -188,16 +188,6 @@ fn main() {

deps.emit();

// vcpkg-rs is not guaranteed to emit libraries in the order required by a
// single-pass linker, so we might need to make sure that's done right.

if dep_cfg.backend == Backend::Vcpkg && target.contains("-linux-") {
// add icudata to the end of the list of libs as vcpkg-rs
// does not order individual libraries as a single pass
// linker requires.
println!("cargo:rustc-link-lib=icudata");
}

// Copy the static header file for C preprocessing convenience.

let mut main_header_src = manifest_dir;
Expand Down
1 change: 1 addition & 0 deletions crates/xetex_layout/layout/xetex-XeTeXLayoutInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ authorization from the copyright holders.
#include <harfbuzz/hb.h>
#include <harfbuzz/hb-graphite2.h>
#if !HB_VERSION_ATLEAST(2,5,0)
/* Note: this configuration is no longer actively tested */
#include <harfbuzz/hb-icu.h>
#endif
#include <harfbuzz/hb-ot.h>
Expand Down
5 changes: 4 additions & 1 deletion dist/azure-build-and-test-pkgconfig.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2020 the Tectonic Project
# Copyright 2016-2023 the Tectonic Project
# Licensed under the MIT License.
#
# Azure Pipelines template for a standard build-and-test job getting
Expand Down Expand Up @@ -32,9 +32,12 @@ steps:
- bash: |
set -xeuo pipefail
# libfuse2 here is to support the AppImage build associated with
# the "primary" Linux artifact.
pkgs="
libgraphite2-dev
libfontconfig1-dev
libfuse2
libicu-dev
libssl-dev
openssl
Expand Down
28 changes: 14 additions & 14 deletions dist/azure-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ parameters:
type: object
default:
- name: linux_stable_semistatic
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
params:
primaryBuild: true
vars:
Expand All @@ -27,7 +27,7 @@ parameters:
TECTONIC_PKGCONFIG_FORCE_SEMI_STATIC: true

- name: linux_stable_extdeps
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
params:
canaryBuild: true
installAllDeps: true
Expand All @@ -37,7 +37,7 @@ parameters:
TOOLCHAIN: stable

- name: linux_stable_intdeps
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
params:
canaryBuild: true
installAllDeps: false
Expand All @@ -46,15 +46,15 @@ parameters:
TOOLCHAIN: stable

- name: linux_beta
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
params:
canaryBuild: true
vars:
TARGET: x86_64-unknown-linux-gnu
TOOLCHAIN: beta

- name: linux_nightly
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
params:
canaryBuild: true
vars:
Expand Down Expand Up @@ -99,7 +99,7 @@ parameters:
TOOLCHAIN: stable-x86_64-pc-windows-gnu

- name: linux_ftmtx_none
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
params:
canaryBuild: true
installAllDeps: false
Expand All @@ -109,7 +109,7 @@ parameters:
TOOLCHAIN: stable

- name: linux_ftmtx_all
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
params:
canaryBuild: true
installAllDeps: true
Expand All @@ -119,7 +119,7 @@ parameters:
TOOLCHAIN: stable

- name: linux_ftmtx_curl
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
params:
canaryBuild: true
installAllDeps: true
Expand All @@ -133,7 +133,7 @@ parameters:
type: object
default:
- name: x86_64_unknown_linux_gnu
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
params:
canaryBuild: true
vars:
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
# rustfmt check
- job: rustfmt
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-latest
steps:
- bash: rustup component add rustfmt
displayName: "Install rustfmt"
Expand All @@ -198,7 +198,7 @@ jobs:
# clippy check
- job: clippy
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-latest
steps:
- template: azure-generic-build-setup.yml
- bash: |
Expand Down Expand Up @@ -251,7 +251,7 @@ jobs:
- ${{ each build in parameters.crossBuilds }}:
- job: ${{ format('cross_{0}', build.name) }}
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-22.04
steps:
- template: azure-build-and-test-cross.yml
variables:
Expand All @@ -261,7 +261,7 @@ jobs:
# coverage analysis check
- job: coverage
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-latest
steps:
- template: azure-coverage.yml
variables:
Expand All @@ -270,7 +270,7 @@ jobs:
# book build
- job: book
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-latest
steps:
- template: azure-generic-build-setup.yml
- bash: |
Expand Down
Loading

0 comments on commit 41168a9

Please sign in to comment.