Skip to content

Commit

Permalink
Build v1.0.2 -> v1.0.3
Browse files Browse the repository at this point in the history
Build deb on branch

Build file version

Fix build filename

Gitworks version 1.0.3
  • Loading branch information
Hungry Warrior committed Jun 25, 2024
1 parent 0eec0e0 commit 56d9a13
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Deb

on:
push:
branches: [ develop, '**-release', 'release-**' ]
branches: [ develop, '**-release', 'release-**', 'feat/chain-upgrade' ]
workflow_dispatch:
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
Expand All @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
env:
SGX_MODE: HW
VERSION: "1.0.2"
VERSION: "1.0.3"
PRODUCTION_MODE: true
steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION := v1.0.2
VERSION := v1.0.3
COMMIT := $(shell git log -1 --format='%H')
ENCLAVE_HOME ?= $(HOME)/.swisstronik-enclave
PRODUCTION_MODE ?= false
Expand Down Expand Up @@ -85,11 +85,11 @@ install: go.sum

build: go.sum
$(MAKE) -C go-sgxvm build
go build -mod=mod $(BUILD_FLAGS) -tags osusergo,netgo -o build/swisstronikd ./cmd/swisstronikd
go build -mod=mod $(BUILD_FLAGS) -tags osusergo,netgo -o build/swisstronikd-$(VERSION) ./cmd/swisstronikd

build_d: go.sum
$(MAKE) -C go-sgxvm build_d
go build -mod=mod $(BUILD_FLAGS) -tags osusergo,netgo -o build/swisstronikd ./cmd/swisstronikd
go build -mod=mod $(BUILD_FLAGS) -tags osusergo,netgo -o build/swisstronikd-$(VERSION) ./cmd/swisstronikd

build_attestation_server: go.sum
AS_MODE=true $(MAKE) -C go-sgxvm build_AS
Expand Down
6 changes: 3 additions & 3 deletions docker/deb.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ RUN make build
############ Node binary for deb package
FROM compile-base as build-deb

ARG BUILD_VERSION="v1.0.2"
ARG BUILD_VERSION="v1.0.3"
ENV VERSION=${BUILD_VERSION}
ARG DEB_BIN_DIR=/usr/local/bin
ENV DEB_BIN_DIR=${DEB_BIN_DIR}
Expand All @@ -59,9 +59,9 @@ ARG ENCLAVE_HOME=${ENCLAVE_HOME}
WORKDIR /root

# Copy over binaries from the build-env
COPY --from=compile-chain /root/chain/build/swisstronikd swisstronikd
COPY --from=compile-chain /root/chain/build/swisstronikd-v1.0.3 swisstronikd-v1.0.3
COPY --from=compile-chain /root/.swisstronik-enclave /usr/lib/.swisstronik-enclave
COPY --from=compile-chain /root/chain/go-sgxvm/internal/api/libsgx_wrapper_v1.0.2.x86_64.so /usr/lib/.swisstronik-enclave/libsgx_wrapper_v1.0.2.x86_64.so
COPY --from=compile-chain /root/chain/go-sgxvm/internal/api/libsgx_wrapper_v1.0.3.x86_64.so /usr/lib/.swisstronik-enclave/libsgx_wrapper_v1.0.3.x86_64.so

COPY ./deb ./deb
COPY ./scripts/build_deb.sh .
Expand Down
4 changes: 2 additions & 2 deletions go-sgxvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CXX=clang++
SGX_MODE ?= HW
ENCLAVE_HOME ?= $(HOME)/.swisstronik-enclave
PRODUCTION_MODE ?= false
VERSION := v1.0.2
VERSION := v1.0.3

build:
@ENCLAVE_HOME=$(ENCLAVE_HOME) PRODUCTION_MODE=$(PRODUCTION_MODE) SGX_MODE=$(SGX_MODE) make build -C ../sgxvm/
Expand All @@ -34,4 +34,4 @@ build_AS: build
go build -tags osusergo,netgo,attestationServer -o ../build/attestationServer ./cmd/attestation

build_AS_d: build_d
go build -tags osusergo,netgo,attestationServer -o ../build/attestationServer ./cmd/attestation
go build -tags osusergo,netgo,attestationServer -o ../build/attestationServer ./cmd/attestation
2 changes: 1 addition & 1 deletion go-sgxvm/internal/api/link_glibclinux_aarch64.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

package api

// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.2.aarch64
// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.3.aarch64
import "C"
2 changes: 1 addition & 1 deletion go-sgxvm/internal/api/link_glibclinux_x86_64.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

package api

// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.2.x86_64
// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.3.x86_64
import "C"
2 changes: 1 addition & 1 deletion go-sgxvm/internal/api/link_mac.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

package api

// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.2
// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.3
import "C"
2 changes: 1 addition & 1 deletion go-sgxvm/internal/api/link_muslc.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

package api

// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.2_muslc
// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.3_muslc
import "C"
2 changes: 1 addition & 1 deletion go-sgxvm/internal/api/link_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

package api

// #cgo LDFLAGS: -lsgx_wrapper_v1.0.2
// #cgo LDFLAGS: -lsgx_wrapper_v1.0.3
import "C"
2 changes: 1 addition & 1 deletion go-sgxvm/internal/api/link_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

package api

// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.2
// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lsgx_wrapper_v1.0.3
import "C"
8 changes: 4 additions & 4 deletions go-sgxvm/src/enclave/doorbell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::env;
use std::ops::Deref;
use std::time::Duration;

static ENCLAVE_FILE: &'static str = "v1.0.2_enclave.signed.so";
static ENCLAVE_FILE: &'static str = "v1.0.3_enclave.signed.so";
const ENCLAVE_LOCK_TIMEOUT: u64 = 6 * 5;

pub struct EnclaveDoorbell {
Expand All @@ -26,7 +26,7 @@ impl EnclaveDoorbell {
secs_attr: sgx_attributes_t { flags: 0, xfrm: 0 },
misc_select: 0,
};

let enclave_home = env::var("ENCLAVE_HOME").unwrap_or_else(|_| {
let dir_path = String::from(
std::env::home_dir()
Expand All @@ -37,12 +37,12 @@ impl EnclaveDoorbell {
format!("{}/.swisstronik-enclave", dir_path)
});
let enclave_path = format!("{}/{}", enclave_home, ENCLAVE_FILE);

println!(
"[Enclave Doorbell] Creating enclave. Enclave location: {:?}",
enclave_path
);

let enclave = SgxEnclave::create(
enclave_path,
debug,
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ set -e
rm -rf /tmp/swisstronik-build

mkdir -p /tmp/swisstronik-build/deb/"$DEB_BIN_DIR"
cp -f ./swisstronikd /tmp/swisstronik-build/deb/"$DEB_BIN_DIR"/swisstronikd
chmod +x /tmp/swisstronik-build/deb/"$DEB_BIN_DIR"/swisstronikd
cp -f ./swisstronikd-v1.0.3 /tmp/swisstronik-build/deb/"$DEB_BIN_DIR"/swisstronikd-v1.0.3
chmod +x /tmp/swisstronik-build/deb/"$DEB_BIN_DIR"/swisstronikd-v1.0.3

mkdir -p /tmp/swisstronik-build/deb/"$DEB_LIB_DIR"

Expand Down

0 comments on commit 56d9a13

Please sign in to comment.