mirror of https://github.com/ehang-io/nps
update travis ci
parent
78c71c2fa3
commit
1dca14fc01
|
@ -14,7 +14,8 @@ jobs:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- os: windows
|
- os: windows
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- chmod +x ./build.sh && ./build.sh
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then chmod +x ./build.sh && ./build.sh; fi
|
||||||
|
- if [ "$TRAVIS_OS_NAME" = "windows" ]; go build -buildmode=c-shared -o npc_sdk.dll cmd\npc\sdk.go && tar -czvf npc_sdk.tar.gz npc_sdk.dll npc_sdk.h fi
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
|
|
13
build.sh
13
build.sh
|
@ -1,9 +1,6 @@
|
||||||
#/bash/sh
|
#/bash/sh
|
||||||
|
|
||||||
if [ "$TRAVIS_OS_NAME" = "windows" ]; then
|
|
||||||
go build -buildmode=c-shared -o npc_sdk.dll cmd\npc\sdk.go
|
|
||||||
tar -czvf npc_sdk.tar.gz npc_sdk.dll npc_sdk.h
|
|
||||||
else
|
|
||||||
wget https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz
|
wget https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz
|
||||||
tar -xvf upx-3.95-amd64_linux.tar.xz
|
tar -xvf upx-3.95-amd64_linux.tar.xz
|
||||||
cp upx-3.95-amd64_linux/upx ./
|
cp upx-3.95-amd64_linux/upx ./
|
||||||
|
@ -170,5 +167,9 @@ else
|
||||||
cp ~/spksrc/packages/npc_noarch-all_$VERSION-1.spk ./npc_$VERSION.spk
|
cp ~/spksrc/packages/npc_noarch-all_$VERSION-1.spk ./npc_$VERSION.spk
|
||||||
|
|
||||||
|
|
||||||
|
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
fi
|
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||||
|
docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d
|
||||||
|
docker buildx create --use --name mybuilder
|
||||||
|
docker buildx build --tag ffdfgdfg/nps:$VERSION --output type=image,push=true --file Dockerfile.nps --platform=linux/amd64,linux/arm64,linux/386,linux/arm .
|
||||||
|
docker buildx build --tag ffdfgdfg/npc:$VERSION --output type=image,push=true --file Dockerfile.npc --platform=linux/amd64,linux/arm64,linux/386,linux/arm .
|
||||||
|
|
Loading…
Reference in New Issue