mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-09 08:23:57 +01:00
Add to build all windows-arm64 / bin-windows-arm64 build option (#638)
* Add to build all windows-arm64 / bin-winarm64 builds * update release to build for windows-arm64 * cleanup Co-authored-by: Wade Simmons <wsimmons@slack-corp.com>
This commit is contained in:
parent
730a5c4a23
commit
7672c7087a
32
.github/workflows/release.yml
vendored
32
.github/workflows/release.yml
vendored
@ -31,7 +31,7 @@ jobs:
|
|||||||
path: release
|
path: release
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
name: Build Windows amd64
|
name: Build Windows
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go 1.17
|
- name: Set up Go 1.17
|
||||||
@ -45,8 +45,14 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
echo $Env:GITHUB_REF.Substring(11)
|
echo $Env:GITHUB_REF.Substring(11)
|
||||||
go build -trimpath -ldflags "-X main.Build=$($Env:GITHUB_REF.Substring(11))" -o build\nebula.exe ./cmd/nebula-service
|
mkdir build\windows-amd64
|
||||||
go build -trimpath -ldflags "-X main.Build=$($Env:GITHUB_REF.Substring(11))" -o build\nebula-cert.exe ./cmd/nebula-cert
|
$Env:GOARCH = "amd64"
|
||||||
|
go build -trimpath -ldflags "-X main.Build=$($Env:GITHUB_REF.Substring(11))" -o build\windows-amd64\nebula.exe ./cmd/nebula-service
|
||||||
|
go build -trimpath -ldflags "-X main.Build=$($Env:GITHUB_REF.Substring(11))" -o build\windows-amd64\nebula-cert.exe ./cmd/nebula-cert
|
||||||
|
mkdir build\windows-arm64
|
||||||
|
$Env:GOARCH = "arm64"
|
||||||
|
go build -trimpath -ldflags "-X main.Build=$($Env:GITHUB_REF.Substring(11))" -o build\windows-arm64\nebula.exe ./cmd/nebula-service
|
||||||
|
go build -trimpath -ldflags "-X main.Build=$($Env:GITHUB_REF.Substring(11))" -o build\windows-arm64\nebula-cert.exe ./cmd/nebula-cert
|
||||||
mkdir build\dist\windows
|
mkdir build\dist\windows
|
||||||
mv dist\windows\wintun build\dist\windows\
|
mv dist\windows\wintun build\dist\windows\
|
||||||
|
|
||||||
@ -117,7 +123,10 @@ jobs:
|
|||||||
- name: Zip Windows
|
- name: Zip Windows
|
||||||
run: |
|
run: |
|
||||||
cd windows-latest
|
cd windows-latest
|
||||||
|
cp windows-amd64/* .
|
||||||
zip -r nebula-windows-amd64.zip nebula.exe nebula-cert.exe dist
|
zip -r nebula-windows-amd64.zip nebula.exe nebula-cert.exe dist
|
||||||
|
cp windows-arm64/* .
|
||||||
|
zip -r nebula-windows-arm64.zip nebula.exe nebula-cert.exe dist
|
||||||
|
|
||||||
- name: Create sha256sum
|
- name: Create sha256sum
|
||||||
run: |
|
run: |
|
||||||
@ -127,9 +136,12 @@ jobs:
|
|||||||
cd $dir
|
cd $dir
|
||||||
if [ "$dir" = windows-latest ]
|
if [ "$dir" = windows-latest ]
|
||||||
then
|
then
|
||||||
sha256sum <nebula.exe | sed 's=-$=nebula-windows-amd64.zip/nebula.exe='
|
sha256sum <windows-amd64/nebula.exe | sed 's=-$=nebula-windows-amd64.zip/nebula.exe='
|
||||||
sha256sum <nebula-cert.exe | sed 's=-$=nebula-windows-amd64.zip/nebula-cert.exe='
|
sha256sum <windows-amd64/nebula-cert.exe | sed 's=-$=nebula-windows-amd64.zip/nebula-cert.exe='
|
||||||
|
sha256sum <windows-arm64/nebula.exe | sed 's=-$=nebula-windows-arm64.zip/nebula.exe='
|
||||||
|
sha256sum <windows-arm64/nebula-cert.exe | sed 's=-$=nebula-windows-arm64.zip/nebula-cert.exe='
|
||||||
sha256sum nebula-windows-amd64.zip
|
sha256sum nebula-windows-amd64.zip
|
||||||
|
sha256sum nebula-windows-arm64.zip
|
||||||
elif [ "$dir" = darwin-latest ]
|
elif [ "$dir" = darwin-latest ]
|
||||||
then
|
then
|
||||||
sha256sum <nebula-darwin.zip | sed 's=-$=nebula-darwin.zip='
|
sha256sum <nebula-darwin.zip | sed 's=-$=nebula-darwin.zip='
|
||||||
@ -190,6 +202,16 @@ jobs:
|
|||||||
asset_name: nebula-windows-amd64.zip
|
asset_name: nebula-windows-amd64.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
|
||||||
|
- name: Upload windows-arm64
|
||||||
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./windows-latest/nebula-windows-arm64.zip
|
||||||
|
asset_name: nebula-windows-arm64.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
||||||
- name: Upload linux-amd64
|
- name: Upload linux-amd64
|
||||||
uses: actions/upload-release-asset@v1.0.1
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
env:
|
env:
|
||||||
|
|||||||
6
Makefile
6
Makefile
@ -48,7 +48,8 @@ ALL = $(ALL_LINUX) \
|
|||||||
darwin-amd64 \
|
darwin-amd64 \
|
||||||
darwin-arm64 \
|
darwin-arm64 \
|
||||||
freebsd-amd64 \
|
freebsd-amd64 \
|
||||||
windows-amd64
|
windows-amd64 \
|
||||||
|
windows-arm64
|
||||||
|
|
||||||
e2e:
|
e2e:
|
||||||
$(TEST_ENV) go test -tags=e2e_testing -count=1 $(TEST_FLAGS) ./e2e
|
$(TEST_ENV) go test -tags=e2e_testing -count=1 $(TEST_FLAGS) ./e2e
|
||||||
@ -78,6 +79,9 @@ BUILD_ARGS = -trimpath
|
|||||||
bin-windows: build/windows-amd64/nebula.exe build/windows-amd64/nebula-cert.exe
|
bin-windows: build/windows-amd64/nebula.exe build/windows-amd64/nebula-cert.exe
|
||||||
mv $? .
|
mv $? .
|
||||||
|
|
||||||
|
bin-windows-arm64: build/windows-arm64/nebula.exe build/windows-arm64/nebula-cert.exe
|
||||||
|
mv $? .
|
||||||
|
|
||||||
bin-darwin: build/darwin-amd64/nebula build/darwin-amd64/nebula-cert
|
bin-darwin: build/darwin-amd64/nebula build/darwin-amd64/nebula-cert
|
||||||
mv $? .
|
mv $? .
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user