Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: adding testing matrix for os release matrix #4

Merged
merged 1 commit into from
Feb 17, 2024
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
10 changes: 2 additions & 8 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fluxrm/flux-sched:bookworm
FROM fluxrm/flux-sched:bookworm-amd64

LABEL maintainer="Vanessasaurus <@vsoch>"

Expand All @@ -17,13 +17,7 @@ RUN wget https://go.dev/dl/go1.19.10.linux-amd64.tar.gz && tar -xvf go1.19.10.l
mv go /usr/local && rm go1.19.10.linux-amd64.tar.gz
ENV PATH=$PATH:/usr/local/go/bin:/home/vscode/go/bin

RUN git clone https://github.com/flux-framework/flux-sched /opt/flux-sched && \
cd /opt/flux-sched && \
git fetch && \
export FLUX_SCHED_VERSION=0.58.0 && \
./autogen.sh && \
./configure --prefix=/usr && \
make && make install
RUN git clone https://github.com/flux-framework/flux-sched /opt/flux-sched

# Add the group and user that match our ids
RUN groupadd -g ${USER_GID} ${USERNAME} && \
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ name: test fluxion-go

on:
pull_request: []
workflow_dispatch:

# Bindings should always be checked against the latest containers
# 2:10 every Thursday
schedule:
- cron: '10 2 * * 4'

jobs:
test:
Expand All @@ -14,7 +20,11 @@ jobs:
strategy:
fail-fast: false
matrix:
test: [["fluxrm/flux-sched:bookworm", "0.32.0"]]
# container base and lib prefix
test: [["fluxrm/flux-sched:jammy", "/usr/lib"],
["fluxrm/flux-sched:fedora38", "/usr/lib64"],
["fluxrm/flux-sched:bookworm-amd64", "/usr/lib"],
["fluxrm/flux-sched:el8", "/usr/lib64"]]

container:
image: ${{ matrix.test[0] }}
Expand All @@ -25,23 +35,13 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: ^1.19
# TODO: do we want this to be for different versions? Need to coincide with container bases
# We also want the reapi_cli.so to be built by default

# TODO: we should consider distributing the header files with the release builds
- name: flux-sched build
env:
version: ${{ matrix.test[1] }}
run: |
git clone https://github.com/flux-framework/flux-sched /opt/flux-sched
export FLUX_SCHED_VERSION=${version}
cd /opt/flux-sched
./autogen.sh
./configure --prefix=/usr
make && make install
ls /usr/lib/flux

run: git clone https://github.com/flux-framework/flux-sched /opt/flux-sched
- name: Build
run: make build
run: LIB_PREFIX=${{ matrix.test[1] }} make build
- name: Test Binary
run: make test-binary
run: LIB_PREFIX=${{ matrix.test[1] }} make test-binary
- name: Test Modules
run: make test-modules
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ JOBSPECS ?= $(HERE)/cmd/test/data/jobspecs
# This assumes a build in the .devcontainer Dockerfile environment
FLUX_SCHED_ROOT ?= /opt/flux-sched
INSTALL_PREFIX ?= /usr

# Needed to distinguish /usr/lib and /usr/lib54
LIB_PREFIX ?= /usr/lib
COMMONENVVAR=GOOS=$(shell uname -s | tr A-Z a-z)
LD_LIBRARY_PATH=/usr/lib:/usr/lib/flux:/usr/local/lib:/usr/local/lib/flux

BUILDENVVAR=CGO_CFLAGS="-I${FLUX_SCHED_ROOT} -I${FLUX_SCHED_ROOT}/resource/reapi/bindings/c" CGO_LDFLAGS="-L${INSTALL_PREFIX}/lib -L${INSTALL_PREFIX}/lib/flux -L${FLUX_SCHED_ROOT}/resource/reapi/bindings -lreapi_cli -lflux-idset -lstdc++ -lczmq -ljansson -lhwloc -lboost_system -lflux-hostlist -lboost_graph -lyaml-cpp"
# BUILDENVAR=CGO_CFLAGS="${CGO_CFLAGS}" CGO_LDFLAGS='${CGO_LIBRARY_FLAGS}' go build -ldflags '-w'
# Note that el8 and derivatives are in /usr/lib64
LD_LIBRARY_PATH=$(LIB_PREFIX):$(LIB_PREFIX)/flux

BUILDENVVAR=CGO_CFLAGS="-I${FLUX_SCHED_ROOT} -I${FLUX_SCHED_ROOT}/resource/reapi/bindings/c" CGO_LDFLAGS="-L${LIB_PREFIX} -L${LIB_PREFIX}/flux -L${FLUX_SCHED_ROOT}/resource/reapi/bindings -lreapi_cli -lflux-idset -lstdc++ -lczmq -ljansson -lhwloc -lboost_system -lflux-hostlist -lboost_graph -lyaml-cpp"

.PHONY: all
all: build
Expand Down
Loading