Skip to content

Commit

Permalink
Merge pull request #11 from leonnicolas/use-cross
Browse files Browse the repository at this point in the history
use cross
  • Loading branch information
leonnicolas authored Jan 10, 2024
2 parents db080c5 + e571cab commit 036cf8c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,11 @@ jobs:
uses: actions/checkout@v2
with:
repository: cloudflare/boringtun
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target=${{ matrix.target }}
- uses: dtolnay/rust-toolchain@stable
- name: install cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: install binary
run: cross build --target ${{ matrix.target }} --release --bin boringtun-cli
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.target }}
Expand Down Expand Up @@ -75,7 +70,7 @@ jobs:
context: .
file: ./Dockerfile
platforms: linux/arm64, linux/arm, linux/amd64
push: true
push: ${{github.ref_name == 'main'}}
build-args: |
FROM=debian:stable-slim
tags: |-
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/build_alpine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,11 @@ jobs:
uses: actions/checkout@v2
with:
repository: cloudflare/boringtun
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target=${{ matrix.target }}
- uses: dtolnay/rust-toolchain@stable
- name: install cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: install binary
run: cross build --target ${{ matrix.target }} --release --bin boringtun-cli
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.target }}
Expand Down Expand Up @@ -75,7 +70,7 @@ jobs:
context: .
platforms: linux/arm64, linux/arm, linux/amd64
file: ./Dockerfile
push: true
push: ${{github.ref_name == 'main'}}
build-args: |
FROM=alpine:3.17
tags: |-
Expand Down

0 comments on commit 036cf8c

Please sign in to comment.