-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
701 additions
and
69 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.cs.allow-jit</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
<true/> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Build for alpine-arm64 | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the code | ||
- name: Checkout the code | ||
uses: actions/checkout@v1 | ||
|
||
# Setup Docker for cross platform build | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
# Setup Docker for cross platform build | ||
- name: Set up docker buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
# Build docker image | ||
- name: Run build | ||
run: docker buildx build --load --platform linux/arm64 -f ./docker/Dockerfile.alpine-arm64 . -t tagocore-container | ||
|
||
# Pull binary out of docker container | ||
- name: Extract tagocore binary out of docker | ||
run: docker cp $(docker create tagocore-container):/usr/src/app/__build__binary__/tagocore ./tagocore | ||
|
||
# Set binary as executable | ||
- name: Chmod | ||
run: chmod +x ./tagocore | ||
|
||
# Zip the binary | ||
- name: Generate tar.gz | ||
run: tar cvf - tagocore | gzip > ./tagocore-alpine-arm64.tar.gz | ||
|
||
# Upload the zip file as an artifact | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: mqttrelay-alpine-arm64 | ||
path: ../tagocore.zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Build for alpine-x64 | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the code | ||
- name: Checkout the code | ||
uses: actions/checkout@v1 | ||
|
||
# Setup Docker for cross platform build | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
# Setup Docker for cross platform build | ||
- name: Set up docker buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
# Build docker image | ||
- name: Run build | ||
run: docker buildx build --load --platform linux/arm64 -f ./docker/Dockerfile.alpine-arm64 . -t tagocore-container | ||
|
||
# Pull binary out of docker container | ||
- name: Extract tagocore binary out of docker | ||
run: docker cp $(docker create tagocore-container):/usr/src/app/__build__binary__/tagocore ./tagocore | ||
|
||
# Set binary as executable | ||
- name: Chmod | ||
run: chmod +x ./tagocore | ||
|
||
# Zip the binary | ||
- name: Generate tar.gz | ||
run: tar cvf - tagocore | gzip > ./tagocore-alpine-arm64.tar.gz | ||
|
||
# Upload the zip file as an artifact | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: mqttrelay-alpine-arm64 | ||
path: ../tagocore.zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Deplot to DockerHub | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version" | ||
required: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and deploy images | ||
run: bash dockerhub.sh ${{ github.event.inputs.version }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build for mac-x64 | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-11 | ||
|
||
steps: | ||
# Checkout the code | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
run: | | ||
rustup update --no-self-update stable | ||
rustup component add --toolchain stable rustfmt | ||
rustup default stable | ||
# Build the modules | ||
- name: Build | ||
run: cargo build --verbose --release | ||
|
||
- name: Run tests | ||
run: cargo test --verbose | ||
|
||
# # Sign the executable | ||
# - name: Codesign binary | ||
# env: | ||
# MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} | ||
# MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} | ||
# MACOS_FULL_IDENTITY: ${{ secrets.MACOS_FULL_IDENTITY }} | ||
# run: | | ||
# echo $MACOS_CERTIFICATE | openssl base64 -d -A > certificate.p12 | ||
# security create-keychain -p $MACOS_CERTIFICATE_PWD build.keychain | ||
# security default-keychain -s build.keychain | ||
# security unlock-keychain -p $MACOS_CERTIFICATE_PWD build.keychain | ||
# security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign | ||
# security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_CERTIFICATE_PWD build.keychain | ||
# cd __build__binary__ | ||
# /usr/bin/codesign -f -s "$MACOS_FULL_IDENTITY" --entitlements ../.github/macos-build-entitlements.plist --options=runtime --timestamp ./tagocore | ||
# zip ./tagocore.zip ./tagocore | ||
# /usr/bin/codesign -f -s "$MACOS_FULL_IDENTITY" --options=runtime --timestamp ./tagocore.zip | ||
|
||
# # Notarize app using xcrun altool | ||
# - name: Notarize binary | ||
# env: | ||
# MACOS_DEVELOPER_EMAIL: ${{ secrets.MACOS_DEVELOPER_EMAIL }} | ||
# MACOS_DEVELOPER_PWD: ${{ secrets.MACOS_DEVELOPER_PWD }} | ||
# MACOS_BUNDLE_ID: ${{ secrets.MACOS_BUNDLE_ID }} | ||
# MACOS_ASC_PROVIDER: ${{ secrets.MACOS_ASC_PROVIDER }} | ||
# run: xcrun altool --notarize-app --primary-bundle-id "$MACOS_BUNDLE_ID" -u "$MACOS_DEVELOPER_EMAIL" -p "$MACOS_DEVELOPER_PWD" --asc-provider "$MACOS_ASC_PROVIDER" -f ./__build__binary__/tagocore.zip | ||
|
||
# Zip the binary | ||
- name: Generate tar.gz | ||
run: | | ||
cd __build__binary__ | ||
unzip -o tagocore.zip | ||
tar cvf - tagocore | gzip > ../tagocore-mac-x64.tar.gz | ||
# Upload the zip file as an artifact | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: mqttrelay-macos-x64 | ||
path: ../tagocore.zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Build for win-x64 | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the code | ||
- name: Checkout the code | ||
uses: actions/checkout@v1 | ||
|
||
# Install dependencies | ||
- name: Install dependencies | ||
run: npm install | ||
|
||
# Build the modules | ||
- name: Run build | ||
run: npm run build | ||
|
||
# Manually copy the bin file of sdk to the .bin folder to use the local copy of the sdk | ||
- name: Override tcore-plugin .bin file | ||
run: cd ./node_modules/.bin; ln -s ../../packages/tcore-sdk/build/Bin/Bin.js tcore-plugin; chmod +x tcore-plugin; cd ../../ | ||
|
||
# Pack Plugin Store, TagoIO Integration, and Local Filesystem into a .tcore file | ||
- name: Pack built-in plugins | ||
run: npm run pack | ||
|
||
# Add the packed .tcore files to the /plugins folder | ||
- name: Move built-in plugins to plugins folder | ||
run: npm run plugin:add | ||
|
||
# Generate the executable | ||
- name: Generate executable | ||
run: ./node_modules/.bin/pkg package.json -t node16-win-x64 --public-packages "*" --no-bytecode --public --compress Brotli | ||
|
||
# Zip the executable | ||
- name: Generate zip | ||
run: cd __build__binary__; zip ../tagocore.zip ./tagocore.exe | ||
|
||
# Upload the zip file as an artifact | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: mqttrelay-windows-x64 | ||
path: ../tagocore.zip |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.