Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build-sim:
runs-on: ubuntu-latest
container:
image: tryspaceorg/tryspace-lab
image: tryspaceorg/tryspace-lab:0.0.0
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -26,7 +26,7 @@ jobs:
build-test:
runs-on: ubuntu-latest
container:
image: tryspaceorg/tryspace-lab
image: tryspaceorg/tryspace-lab:0.0.0
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@
export BUILDDIR ?= $(CURDIR)/build
export TOPDIR ?= $(CURDIR)/..

export BUILD_IMAGE ?= tryspaceorg/tryspace-lab
export BUILD_IMAGE ?= tryspaceorg/tryspace-lab:0.0.0
export CONTAINER_NAME ?= tryspace-lab
export RUNTIME_DIRECTOR_NAME ?= tryspace-director
export RUNTIME_SERVER_NAME ?= tryspace-server

# Determine number of parallel jobs to avoid maxing out low-power systems (Raspberry Pi etc.).
# Use `nproc - 1` but ensure at least 1 job.
NPROC := $(shell nproc 2>/dev/null || echo 1)
JOBS := $(shell if [ $(NPROC) -le 1 ]; then echo 1; else expr $(NPROC) - 1; fi)

# Commands
build:
docker run --rm -v $(TOPDIR):$(TOPDIR) --user $(shell id -u):$(shell id -g) --name $(CONTAINER_NAME) -w $(CURDIR) $(BUILD_IMAGE) make -j build-sim
docker run --rm -v $(TOPDIR):$(TOPDIR) --user $(shell id -u):$(shell id -g) --name $(CONTAINER_NAME) -w $(CURDIR) $(BUILD_IMAGE) make -j$(JOBS) build-sim

build-director:
mkdir -p $(BUILDDIR)
Expand Down Expand Up @@ -58,4 +63,4 @@ stop:
docker ps --filter name=tryspace-* | xargs docker stop

test:
docker run --rm -v $(TOPDIR):$(TOPDIR) --user $(shell id -u):$(shell id -g) --name $(CONTAINER_NAME) -w $(CURDIR) $(BUILD_IMAGE) make -j build-test
docker run --rm -v $(TOPDIR):$(TOPDIR) --user $(shell id -u):$(shell id -g) --name $(CONTAINER_NAME) -w $(CURDIR) $(BUILD_IMAGE) make -j$(JOBS) build-test
2 changes: 1 addition & 1 deletion test/Dockerfile.director
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM tryspaceorg/tryspace-lab:latest
FROM tryspaceorg/tryspace-lab:0.0.0

# Copy built simulith director and components
COPY ./build/simulith_director_standalone /app/simulith_director_standalone
Expand Down
2 changes: 1 addition & 1 deletion test/Dockerfile.server
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM tryspaceorg/tryspace-lab:latest
FROM tryspaceorg/tryspace-lab:0.0.0

# Copy built FSW files into the image
COPY build /app
Expand Down