Skip to content

Commit

Permalink
Release commit created with Cranko.
Browse files Browse the repository at this point in the history
+++ cranko-release-info-v1
[[projects]]
qnames = ["tectonic_xdv", "cargo"]
version = "0.1.9"
age = 5

[[projects]]
qnames = ["tectonic_cfg_support", "cargo"]
version = "0.1.0"
age = 4

[[projects]]
qnames = ["tectonic", "cargo"]
version = "0.1.16"
age = 0

+++
  • Loading branch information
cranko committed Oct 2, 2020
2 parents d0c0d34 + d814337 commit 0bef918
Show file tree
Hide file tree
Showing 38 changed files with 519 additions and 440 deletions.
5 changes: 5 additions & 0 deletions .config/cranko/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[repo]
upstream_urls = [
'[email protected]:tectonic-typesetting/tectonic.git',
'https://github.com/tectonic-typesetting/tectonic.git',
]
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/cross
/docs/book/*
/target
/tests/plain.fmt
/tests/00*00-latex-*.fmt
/tests/00*00-plain-*.fmt
/tests/xenia/paper.pdf

# ignore mdbook compiled output (HTML)
docs/book/*
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# tectonic 0.1.16 (2020-10-02)

- Add a "plain" backend for reporting status, used when the program is not
attached to a TTY. It will print out reports with colorization. (#636,
@ralismark)
- Start adding infrastructure to automate the creation of bindings from the
C/C++ code to the Rust code, using `cbindgen`. (#643, @ralismark)
- Update the code-coverage infrastructure to gather coverage information
from invocations of the CLI executable inside the test suite (@pkgw)
- Fully automated deployment should really actually totally work this time.

# tectonic 0.1.15 (2020-09-10)

- Building on the work done in 0.1.13, we now capture and report diagnostics
Expand Down
46 changes: 33 additions & 13 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[package]
name = "tectonic"
version = "0.1.15"
version = "0.1.16"
authors = ["Peter Williams <[email protected]>"]
build = "build.rs"
description = """
Expand Down Expand Up @@ -40,9 +40,11 @@ regex = "^1.3"
sha2 = "^0.9"
tectonic_cfg_support = { path = "cfg_support", version ="^0.1.0"}
vcpkg = "0.2.10"
cbindgen = "0.14.4"

[dependencies]
app_dirs = { version = "2", package = "app_dirs2" }
atty = "0.2"
byte-unit = "^4.0"
cfg-if = "0.1"
structopt = "0.3"
Expand Down
25 changes: 19 additions & 6 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
// build.rs -- build helper script for Tectonic.
// Copyright 2016-2019 the Tectonic Project
// Copyright 2016-2020 the Tectonic Project
// Licensed under the MIT License.

/// The Tectonic build script. Not only do we have internal C/C++ code, we
/// also depend on several external C/C++ libraries, so there's a lot to do
/// here. It would be great to streamline things.
///
/// TODO: this surely needs to become much smarter and more flexible.
use std::{
env,
path::{Path, PathBuf},
};
use tectonic_cfg_support::*;

use std::env;
use std::path::{Path, PathBuf};

#[cfg(not(target_os = "macos"))]
const PKGCONFIG_LIBS: &str =
"fontconfig harfbuzz >= 1.4 harfbuzz-icu icu-uc freetype2 graphite2 libpng zlib";
Expand Down Expand Up @@ -184,6 +183,18 @@ fn main() {
let target = env::var("TARGET").unwrap();
let rustflags = env::var("RUSTFLAGS").unwrap_or_default();

// Generate bindings for the C/C++ code to interface with backend Rust code.
// As a heuristic we trigger rebuilds on changes to src/engines/mod.rs since
// most of `core-bindgen.h` comes from this file.
let mut cbindgen_header_path: PathBuf = env::var("OUT_DIR").unwrap().into();
cbindgen_header_path.push("core-bindgen.h");

cbindgen::generate(env::var("CARGO_MANIFEST_DIR").unwrap())
.unwrap()
.write_to_file(&cbindgen_header_path);

println!("cargo:rerun-if-changed=src/engines/mod.rs");

// Re-export $TARGET during the build so that our executable tests know
// what environment variable CARGO_TARGET_@TARGET@_RUNNER to check when
// they want to spawn off executables.
Expand Down Expand Up @@ -365,6 +376,7 @@ fn main() {
.define("HAVE_ZLIB", "1")
.define("HAVE_ZLIB_COMPRESS2", "1")
.define("ZLIB_CONST", "1")
.include(env::var("OUT_DIR").unwrap())
.include(".");

let cppflags = [
Expand Down Expand Up @@ -413,6 +425,7 @@ fn main() {
.file("tectonic/xetex-XeTeXFontMgr.cpp")
.file("tectonic/xetex-XeTeXLayoutInterface.cpp")
.file("tectonic/xetex-XeTeXOTMath.cpp")
.include(env::var("OUT_DIR").unwrap())
.include(".");

dep_state.foreach_include_path(|p| {
Expand Down
18 changes: 18 additions & 0 deletions cbindgen.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
include_guard = "tectonic_core_bindgen_h"
autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */"
include_version = true

language = "C"

# typedef Name struct {} Name
style = "both"

[export]
exclude = [ "DIGEST_LEN" ]

# Table of name conversions to apply to item names
[export.rename]
TectonicBridgeApi = "tt_bridge_api_t"

[fn]
sort_by = "None" # Make cbindgen not mess with our declaration order
48 changes: 37 additions & 11 deletions dist/azure-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,57 @@ steps:
cargo install --force cargo-kcov
displayName: Set up code coverage

# As of Rust 1.44, test executables land in target/debug/deps/ instead of
# target/debug/, which messes up current cargo-kcov (0.5.2) because it tries to
# search for those executables. Work around with `cp`. One of the `tectonic-*`
# binaries is the debug executable, which is hard-linked to
# `target/debug/tectonic`. kcov will erroneously try to run this as a test if we
# copy it, so we have to make not to do that, which we accomplish with a search
# based on the hardlink count. Hacky and fragile but this should get us going.
# Hopefully kcov will get fixed where this will become unneccessary anyway.
- bash: |
# As of Rust 1.44, test executables land in target/debug/deps/ instead of
# target/debug/, which messes up current cargo-kcov (0.5.2) because it tries
# to search for those executables. Work around with `cp`. One of the
# `tectonic-*` binaries is the debug executable, which is hard-linked to
# `target/debug/tectonic`. kcov will erroneously try to run this as a test
# if we copy it, so we have to make not to do that, which we accomplish with
# a search based on the hardlink count. Hacky and fragile but this should
# get us going. Hopefully kcov will get fixed where this will become
# unneccessary anyway.
rm target/debug/deps/tectonic-????????????????
set -xeuo pipefail
cargo test --no-run
find target/debug/deps/tectonic-???????????????? -links 2 -print -delete
cp -vp target/debug/deps/*-???????????????? target/debug/
displayName: cargo test --no-run

- bash: |
set -xeuo pipefail
git add .
cranko release-workflow commit
git show HEAD
displayName: Make release commit

- bash: RUNNING_COVERAGE=1 cargo kcov --no-clean-rebuild
- bash: |
set -xeuo pipefail
p="$(pwd)"
cargo kcov --no-clean-rebuild -- --include-pattern="$p/src,$p/tectonic,$p/xdv"
displayName: cargo kcov

# Our "executable" test executes the actual Tectonic binary. In order to collect
# coverage information about what happens in those executions, we have special
# support in the test harness to wrap the invocations in `kcov` calls.
- bash: |
set -xeuo pipefail
p="$(pwd)"
export TECTONIC_EXETEST_KCOV_RUNNER="kcov --include-pattern=$p/src,$p/tectonic,$p/xdv"
cargo test --test executable
displayName: Special-case executable tests

# Now, merge all of the coverage reports. `cargo kcov` does this automatically,
# but it uses an explicit list of coverage runs, so there's no way to get it to
# include our special executable tests. We just glob everything, which means we
# have to delete the preexisting merged report.
- bash: |
set -xeou pipefail
cd target/cov
rm -rf amber.png bcov.css data glass.png index.html index.js* \
kcov-merged merged-kcov-output
kcov --merge . *
displayName: Merge coverage reports

- bash: |
set -xeuo pipefail
bash <(curl -s https://codecov.io/bash)
displayName: Report coverage results
5 changes: 3 additions & 2 deletions dist/azure-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
set -xeuo pipefail
cranko github delete-release continuous
git tag -f continuous HEAD
git push -f --tags origin continuous
git push -f origin refs/tags/continuous
cranko github create-custom-release \
--name "Continuous Deployment" \
--prerelease \
Expand Down Expand Up @@ -88,6 +88,7 @@ jobs:
CARGO_REGISTRY_TOKEN: $(CARGO_REGISTRY_TOKEN)
- job: github_releases
dependsOn: branch_and_tag # otherwise, GitHub will create the tag itself
pool:
vmImage: ubuntu-20.04
variables:
Expand Down Expand Up @@ -160,7 +161,7 @@ jobs:
GITHUB_TOKEN: $(GITHUB_TOKEN)
- job: update_arch_linux
dependsOn: cargo_publish # <= note!
dependsOn: cargo_publish # need to download the crate file and calc its digest
pool:
vmImage: ubuntu-20.04
variables:
Expand Down
Loading

0 comments on commit 0bef918

Please sign in to comment.