-
Notifications
You must be signed in to change notification settings - Fork 6
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
9 changed files
with
111 additions
and
195 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Run tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: cargo test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: rustfmt | ||
- run: cargo test --locked | ||
fmt: | ||
name: cargo fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: rustfmt | ||
- uses: actions-rust-lang/rustfmt@v1 |
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 |
---|---|---|
@@ -1,35 +1,35 @@ | ||
name: "Publish Releases" | ||
name: Publish releases | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
cratesio: | ||
name: Publish to Crates.io | ||
name: Publish to crates.io | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- run: cargo fetch | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- name: cargo publish | ||
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }} | ||
docker: | ||
name: "Publish to Docker Hub" | ||
runs-on: "ubuntu-latest" | ||
permissions: | ||
id-token: "write" | ||
contents: "read" | ||
name: Publish to DockerHub | ||
strategy: | ||
matrix: | ||
platform: | ||
- os: ubuntu-latest | ||
platform: linux/amd64 | ||
runs-on: ${{ matrix.platform.os }} | ||
steps: | ||
- uses: "actions/checkout@v4" | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-qemu-action@v3 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/login-action@v3 | ||
with: | ||
ref: "${{ github.ref_name }}" | ||
- uses: "docker/login-action@v2" | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
- uses: docker/build-push-action@v6 | ||
with: | ||
username: "${{ secrets.DOCKER_USERNAME }}" | ||
password: "${{ secrets.DOCKER_PASSWORD }}" | ||
- run: "docker build -t edgeecloud/edgee:${{ github.ref_name }} ." | ||
- run: "docker push edgeecloud/edgee:${{ github.ref_name }}" | ||
- run: "docker push edgeecloud/edgee:latest" | ||
|
||
push: true | ||
tags: | | ||
edgeecloud/edgee:${{ github.ref_name }} | ||
edgeecloud/edgee:latest |
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 |
---|---|---|
@@ -1,62 +1,49 @@ | ||
name: Release | ||
|
||
name: Build release | ||
permissions: | ||
contents: write | ||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
workflow_dispatch: | ||
push: | ||
tags: | ||
- 'v*' | ||
jobs: | ||
build-x86_64-linux: { uses: ./.github/workflows/build-x86_64-linux.yml } | ||
build-x86_64-darwin: { uses: ./.github/workflows/build-x86_64-darwin.yml } | ||
build-aarch64-linux: { uses: ./.github/workflows/build-aarch64-linux.yml } | ||
build-aarch64-darwin: { uses: ./.github/workflows/build-aarch64-darwin.yml } | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build-x86_64-linux | ||
- build-x86_64-darwin | ||
- build-aarch64-linux | ||
- build-aarch64-darwin | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create artifacts directory | ||
run: mkdir -p ./artifacts | ||
|
||
- uses: actions/cache/restore@v3 | ||
name: Restore x86_64-linux artifacts | ||
with: | ||
path: build | ||
key: x86_64-linux-artifacts-${{ github.sha }} | ||
- name: Move x86_64-linux artifacts | ||
run: mv ./build ./artifacts/x86_64-linux | ||
|
||
- uses: actions/cache/restore@v3 | ||
name: Restore x86_64-darwin artifacts | ||
with: | ||
path: build | ||
key: x86_64-darwin-artifacts-${{ github.sha }} | ||
- name: Move x86_64-darwin artifacts | ||
run: mv ./build ./artifacts/x86_64-darwin | ||
|
||
- uses: actions/cache/restore@v3 | ||
name: Restore aarch64-linux artifacts | ||
with: | ||
path: build | ||
key: aarch64-linux-artifacts-${{ github.sha }} | ||
- name: Move aarch64-linux artifacts | ||
run: mv ./build ./artifacts/aarch64-linux | ||
|
||
- uses: actions/cache/restore@v3 | ||
name: Restore aarch64-darwin artifacts | ||
with: | ||
path: build | ||
key: aarch64-darwin-artifacts-${{ github.sha }} | ||
|
||
- name: Publish Release to GitHub | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
fail_on_unmatched_files: true | ||
draft: true | ||
files: | | ||
artifacts/** | ||
build-release-binaries: | ||
strategy: | ||
matrix: | ||
platform: | ||
- os: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
features: bundled | ||
- os: macos-latest | ||
target: x86_64-apple-darwin | ||
features: bundled | ||
- os: macos-latest | ||
target: aarch64-apple-darwin | ||
features: bundled | ||
name: Build release binary (${{ matrix.platform.target }} on ${{ matrix.platform.os }}) | ||
runs-on: ${{ matrix.platform.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Build binary | ||
uses: houseabsolute/actions-rust-cross@v0 | ||
with: | ||
command: ${{ matrix.platform.command }} | ||
target: ${{ matrix.platform.target }} | ||
args: '--release --features "${{ matrix.platform.features }}"' | ||
- name: Save binary | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: edgee.${{ matrix.platform.target }} | ||
path: target/${{ matrix.platform.target }}/release/edgee | ||
retention-days: 3 | ||
- run: cp target/${{ matrix.platform.target }}/release/edgee edgee.${{ matrix.platform.target }} | ||
- name: Publish artifacts and release | ||
uses: xresloader/upload-to-github-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
file: edgee.${{ matrix.platform.target }} | ||
tags: true |
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