Skip to content

Commit

Permalink
Moving repo from AnHeuermann to OpenModelica
Browse files Browse the repository at this point in the history
  - Updating CI
  - Bumping version
  - Fixing Dockerfile deb-src
  • Loading branch information
AnHeuermann committed May 8, 2024
1 parent 61b3196 commit 0706511
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 46 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
build:
name: Push Docker image to Docker Hub
name: Build Dockerfile
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
Expand All @@ -21,12 +21,12 @@ jobs:

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
uses: docker/metadata-action@v5
with:
images: anheuermann/openmodelica-build-deps
images: openmodelica/build-deps

- name: Build Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: anheuermann/openmodelica-build-deps
images: openmodelica/build-deps

- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN echo \
$(lsb_release -cs) nightly" | tee /etc/apt/sources.list.d/openmodelica.list > /dev/null
RUN echo \
"deb-src [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openmodelica-keyring.gpg] https://build.openmodelica.org/apt \
nightly contrib" | tee -a /etc/apt/sources.list.d/openmodelica.list > /dev/null
$(lsb_release -cs) nightly" | tee -a /etc/apt/sources.list.d/openmodelica.list > /dev/null
RUN apt-get update && apt-get build-dep -qy openmodelica

# Install additional dependencies, e.g. to build the User's Guide
Expand Down
1 change: 1 addition & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ The MIT License (MIT)
=====================

Copyright © `2023` `Andreas Heuermann`
Copyright © `2024` `Open Source Modelica Consortium (OSMC)`

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
45 changes: 9 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,35 @@
# OpenModelica build-deps Docker Image

[![Build Docker Image](https://github.com/AnHeuermann/build-deps/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/AnHeuermann/build-deps/actions/workflows/build.yml)
[![Publish Docker Image](https://github.com/AnHeuermann/build-deps/actions/workflows/publish.yml/badge.svg)](https://github.com/AnHeuermann/build-deps/actions/workflows/publish.yml)
[![Build Docker Image](https://github.com/OpenModelica/build-deps/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/OpenModelica/build-deps/actions/workflows/build.yml)
[![Publish Docker Image](https://github.com/OpenModelica/build-deps/actions/workflows/publish.yml/badge.svg)](https://github.com/OpenModelica/build-deps/actions/workflows/publish.yml)

The Docker image used to build and deploy
The Docker images used to build and deploy
[OpenModelica](https://github.com/OpenModelica/OpenModelica) with
[Jenkins](https://test.openmodelica.org/jenkins/).

## Structure of the Repository

Each minor version of the Dockerfile corresponds to a OpenModelica minor version and has
its own branch.
Each branch has tags for each patch version.

When creating a release form a tag the [workflow](./.github/workflows/publish.yml) will
publish the Docker image to [https://hub.docker.com/repository/docker/anheuermann/openmodelica-build-deps](anheuermann/openmodelica-build-deps).

### Ubuntu based Images

- 22.04 Jammy: [releases/v1.22](https://github.com/AnHeuermann/build-deps/tree/releases/v1.22)
- 20.04 Focal: [releases/v1.21](https://github.com/AnHeuermann/build-deps/tree/releases/v1.21)
- 18.04 Bionic + cmake: [releases/v1.16-cmake](https://github.com/AnHeuermann/build-deps/tree/releases/v1.16-cmake)
- 18.04 Bionic: [releases/v1.16](https://github.com/AnHeuermann/build-deps/tree/releases/v1.16)

### Debian based Images

- 12 Bookworm
- 11 Bullseye

### CentOS based Images

- CentOS7


## Build

```bash
export TAG=v1.22.0
export TAG=v1.22.3-qtwebengine
docker build --pull --no-cache --tag build-deps:$TAG .
```

## Upload

The [publish.yml](./.github/workflows/publish.yml) workflow will build and upload the
Docker image to [https://hub.docker.com/repository/docker/anheuermann/openmodelica-build-deps](anheuermann/openmodelica-build-deps)
Docker image to [openmodelica/build-deps](https://hub.docker.com/repository/docker/openmodelica/build-deps)
for each release.

To do it manually run:

```bash
export REGISTRY=anheuermann
export TAG=v1.22.0
export REGISTRY=openmodelica
export TAG=v1.22.3-qtwebengine
docker login
docker image tag build-deps:$TAG $REGISTRY/openmodelica-build-deps:$TAG
docker push $REGISTRY/openmodelica-build-deps:$TAG
docker image tag build-deps:$TAG $REGISTRY/build-deps:$TAG
docker push $REGISTRY/build-deps:$TAG
```

## License

The original Dockerfile are taken from [https://github.com/OpenModelica/OpenModelicaBuildScripts](OpenModelica/OpenModelicaBuildScripts).
See [LICENSE.md](./LICENSE.md).

0 comments on commit 0706511

Please sign in to comment.