Stop using cargo internal API, too complicated. Switch to programmatically parsing metadata output. Add CI (untested, probably doesn't work), create dockerfile
This commit is contained in:
46
.gitea/workflows/harmony_composer.yaml
Normal file
46
.gitea/workflows/harmony_composer.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Compile and package harmony_composer
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: rust-cargo
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build for Linux x86_64
|
||||
run: cargo build --release --bin harmony_composer --target x86_64-unknown-linux-gnu
|
||||
|
||||
- name: Build for Linux ARM64
|
||||
run: cargo build --release --bin harmony_composer --target aarch64-unknown-linux-gnu
|
||||
|
||||
- name: Build for Windows x86_64 GNU
|
||||
run: cargo build --release --bin harmony_composer --target x86_64-pc-windows-gnu
|
||||
|
||||
# - name: Build for MacOS ARM64
|
||||
# run: cargo build --release --bin harmony_composer --target aarch64-apple-darwin
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: binaries
|
||||
path: |
|
||||
target/x86_64-unknown-linux-gnu/release/harmony_composer
|
||||
target/aarch64-unknown-linux-gnu/release/harmony_composer
|
||||
target/x86_64-pc-windows-gnu/release/harmony_composer.exe
|
||||
|
||||
- name: Setup log into hub.nationtech.io
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: hub.nationtech.io
|
||||
username: ${{ secrets.HUB_BOT_USERNAME }}
|
||||
password: ${{ secrets.HUB_BOT_PASSWORD }}
|
||||
|
||||
# TODO: build ARM images too
|
||||
- name: Build docker container
|
||||
run: docker build . -t hub.nationtech.io/harmony/harmony_composer
|
||||
|
||||
- name: Push docker container
|
||||
run: docker push hub.nationtech.io/harmony/harmony_composer
|
||||
Reference in New Issue
Block a user