Skip to content

Commit

Permalink
chore: try to cross-compile
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps committed Dec 19, 2023
1 parent df1e64e commit 88f2bf2
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 3 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build-engine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build Rust Engine
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
build:
strategy:
matrix:
platform:
- name: Linux-x86_64
os: [ubuntu-latest]
target: [x86_64-unknown-linux-gnu]
- name: Linux-armv7
os: [ubuntu-latest]
target: [armv7-unknown-linux-gnueabihf]

runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.platform.target }}
override: true

- uses: actions-rs/cargo@v1
with:
command: build
args: --target ${{ matrix.platform.target }} --release
use-cross: true

- uses: actions/upload-artifact@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: libfliptengine-${{ matrix.platform.name }}
path: target/${{ matrix.platform.target }}/release/*.(so|dll|dylib|h)
retention-days: 5
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rust Engine
name: Lint/Test Rust Engine
on:
push:
branches:
Expand Down
1 change: 1 addition & 0 deletions flipt-engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ crc32fast = "1.3.2"
chrono = { version = "0.4.31", features = ["serde", "rustc-serialize"] }
futures = "0.3"
thiserror = "1.0.50"
openssl = { version = "0.10", features = ["vendored"] }

[build-dependencies]
cbindgen = "0.26.0"
Expand Down
5 changes: 3 additions & 2 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,14 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/urfave/cli/v2 v2.24.4 h1:0gyJJEBYtCV87zI/x2nZCPyDxD51K6xM8SkwjHFCNEU=
github.com/urfave/cli/v2 v2.24.4/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
Expand Down

0 comments on commit 88f2bf2

Please sign in to comment.