Skip to content

Commit e26b1bd

Browse files
committed
Add GitHub workflow
Co-Authored-By: Caleb Maclennan
1 parent 3d09cdb commit e26b1bd

3 files changed

Lines changed: 117 additions & 9 deletions

File tree

.github/workflows/rust.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Rust
2+
3+
on:
4+
pull_request: {}
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
11+
build:
12+
strategy:
13+
matrix:
14+
platform: [linux, macos, windows]
15+
include:
16+
- platform: linux
17+
os: ubuntu-20.04
18+
- platform: macos
19+
os: macos-10.15
20+
- platform: windows
21+
os: windows-2019
22+
fail-fast: false
23+
runs-on: ${{ matrix.os }}
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
with:
28+
fetch-depth: 0
29+
- name: Fetch tags
30+
run: git fetch --tags
31+
- if: matrix.platform == 'linux'
32+
name: Setup system dependencies (Linux)
33+
run: sudo apt-get install libgtk-3-dev libxcb-shape0-dev libxcb-xfixes0-dev
34+
- name: Install Rust
35+
uses: actions-rs/toolchain@v1
36+
with:
37+
toolchain: nightly
38+
override: true
39+
components: clippy
40+
- name: Cache cargo builds
41+
uses: actions/cache@v2
42+
with:
43+
path: |
44+
~/.cargo/registry
45+
~/.cargo/git
46+
target/debug
47+
key: cargo-${{ matrix.platform }}-${{ hashFiles('**/Cargo.lock') }}
48+
- name: Run cargo build
49+
run: |
50+
cargo build --locked
51+
- name: Run cargo test
52+
run: |
53+
cargo test --locked
54+
- name: Upload artifacts
55+
uses: actions/upload-artifact@v2
56+
with:
57+
name: MFEKstroke-${{ matrix.platform }}
58+
path: |
59+
target/debug/MFEKstroke
60+
target/debug/MFEKstroke.exe
61+
62+
rustfmt:
63+
strategy:
64+
fail-fast: false
65+
runs-on: ubuntu-20.04
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v2
69+
- name: Install Rust
70+
uses: actions-rs/toolchain@v1
71+
with:
72+
toolchain: nightly
73+
override: true
74+
components: rustfmt
75+
- name: Run rustfmt
76+
run: |
77+
git ls-files '*.rs' | xargs rustfmt --check
78+
79+
cargo_bloat:
80+
if: false
81+
strategy:
82+
fail-fast: false
83+
runs-on: ubuntu-20.04
84+
steps:
85+
- name: Checkout
86+
uses: actions/checkout@v2
87+
- name: Install Rust
88+
uses: actions-rs/toolchain@v1
89+
with:
90+
toolchain: nightly
91+
override: true
92+
- name: Cache cargo builds
93+
uses: actions/cache@v2
94+
with:
95+
path: |
96+
~/.cargo/registry
97+
~/.cargo/git
98+
target
99+
key: cargo-bloat-${{ matrix.platform }}-${{ hashFiles('**/Cargo.lock') }}
100+
- name: Run cargo bloat
101+
uses: orf/cargo-bloat-action@v1
102+
with:
103+
token: ${{ github.token }}

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@ fontforge-sys = { path = "fontforge-sys", optional = true }
2424

2525
[features]
2626
fontforge = ["fontforge-sys"]
27+
28+
[profile.release]
29+
opt-level = 'z'
30+
lto = true
31+
codegen-units = 1

fontforge-sys/nib2.glif

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<glyph name="nib" format="2">
3-
<advance width="0" />
1+
<?xml version="1.0"?>
2+
<glyph name="uni0000" format="2">
3+
<advance width="1000"/>
4+
<unicode hex="0000"/>
45
<outline>
56
<contour>
6-
<point type="curve" y="55" x="25.5" />
7-
<point y="65.555115" type="curve" x="34.814835" />
8-
<point type="curve" x="71.11115" y="29.62915" />
9-
<point x="61" y="19" type="curve" />
7+
<point x="25.5" y="29.5547" type="line"/>
8+
<point x="61" y="65.5547" type="line"/>
9+
<point x="71.1113" y="54.9258" type="line"/>
10+
<point x="34.8145" y="19" type="line"/>
1011
</contour>
1112
</outline>
12-
<lib />
13-
</glyph>
13+
</glyph>

0 commit comments

Comments
 (0)