Skip to content

Commit

Permalink
ci: release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
thesayyn committed Jul 5, 2024
1 parent 20b6b79 commit 5679775
Show file tree
Hide file tree
Showing 7 changed files with 875 additions and 95 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on:
push:
branches:
- main

name: Release

jobs:
release:
name: Release - ${{ matrix.platform.target }}
strategy:
matrix:
platform:
- os: macos-14
target: aarch64-apple-darwin
bin: conform
name: conform-darwin-am64.tar.gz
command: build

runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- run: |
cat include/conformance.cmake > third_party/protobuf/cmake/conformance.cmake
gcc --version
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
target: ${{ matrix.platform.target }}
args: "--locked --release"
strip: true

92 changes: 0 additions & 92 deletions .vscode/settings.json

This file was deleted.

8 changes: 5 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ fn main() {
println!("cargo:rustc-link-search=native={}", &out_dir.to_string());
println!("cargo:rustc-link-lib=conformance");

println!("cargo:warning={}", &out_dir.to_string());

// Proto
protobuf_codegen::Codegen::new()
.protoc()
.include("third_party/protobuf/conformance")
.include("third_party/protobuf/src/")
.include("include")
.input("third_party/protobuf/conformance/conformance.proto")
.input("third_party/protobuf/src/google/protobuf/test_messages_proto3.proto")
.input("third_party/protobuf/src/google/protobuf/test_messages_proto2.proto")
.input("include/test_messages_proto3.proto")
.input("include/test_messages_proto2.proto")
.cargo_out_dir("conformance")
.run_from_script();
}
Loading

0 comments on commit 5679775

Please sign in to comment.