Update to 2018 edition. #73
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [auto] | |
pull_request: | |
workflow_dispatch: | |
merge_group: | |
types: [checks_requested] | |
jobs: | |
linux-ci-static: | |
name: stable, Linux, shared library | |
runs-on: ubuntu-latest | |
env: | |
HARFBUZZ_SYS_NO_PKG_CONFIG: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
# Install harfbuzz from the source in harfbuzz-sys. Use an out-of-tree | |
# build to avoid contaminating the source tree. | |
- name: Build harfbuzz | |
env: | |
PREFIX: /usr/local | |
run: | | |
make -f harfbuzz-sys/makefile.touch touch HARFBUZZ=harfbuzz-sys/harfbuzz | |
HARFDIR=`pwd` | |
pushd $RUNNER_TEMP | |
$HARFDIR/harfbuzz-sys/harfbuzz/configure --prefix=$PREFIX --without-icu --without-freetype --without-glib | |
make | |
sudo make install | |
# Make harfbuzz available for linking and confirm expected location | |
TEMP_PATH="$(pkg-config --variable=libdir harfbuzz)" | |
echo "LD_LIBRARY_PATH=$TEMP_PATH" >> $GITHUB_ENV | |
[[ "$TEMP_PATH" == "$PREFIX/lib" ]] || exit 1 | |
popd | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Cargo build | |
run: cargo build --workspace | |
- name: Cargo test | |
run: cargo test --workspace | |
env: | |
RUST_BACKTRACE: 1 | |
linux-ci-shared: | |
name: stable, Linux, static linking, no pkg-config | |
runs-on: ubuntu-latest | |
env: | |
HARFBUZZ_SYS_NO_PKG_CONFIG: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
# Test the harfbuzz-sys package build to check the 'exclude's. We should | |
# do this where the embedded harfbuzz is statically linked, but we don't | |
# need to do it for every environment. | |
- name: Cargo package | |
run: cargo package --manifest-path=harfbuzz-sys/Cargo.toml | |
- name: Cargo build | |
run: cargo build --workspace | |
- name: Cargo test | |
run: cargo test --workspace | |
env: | |
RUST_BACKTRACE: 1 | |
mac-ci-shared: | |
name: stable, macOS, shared library | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: Cargo fmt | |
run: cargo fmt --all -- --check | |
- name: Cargo build | |
run: cargo build --workspace | |
- name: Cargo test | |
run: cargo test --workspace | |
env: | |
RUST_BACKTRACE: 1 | |
windows-ci: | |
name: Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Cargo build | |
run: cargo build --workspace | |
- name: Cargo test | |
run: cargo test --workspace | |
env: | |
RUST_BACKTRACE: 1 | |
build_result: | |
name: Result | |
runs-on: ubuntu-latest | |
needs: | |
- "linux-ci-static" | |
- "linux-ci-shared" | |
- "mac-ci-shared" | |
- "windows-ci" | |
steps: | |
- name: Mark the job as successful | |
run: exit 0 | |
if: success() | |
- name: Mark the job as unsuccessful | |
run: exit 1 | |
if: "!success()" | |