Skip to content

Commit

Permalink
Multi-Platform builds and others build upgrades (#3)
Browse files Browse the repository at this point in the history
* first pass at multiplatform builds and specifying python versions

* platform to platforms

* enable multiplatform

* setup qemu and buildx

* only support x86_64 and aarch_64

* add logic for changing architecture for what OS and E+ expect

* purge cache and increase timeout

* python 3.8 and remove timeout temporarily

* dual python installation

* fix equivalence check

* update actions

* add bcvtb to regain e+ support paridy with current release

* add old libgfortran

* install sundials on final image

* bake shared libraries into Assimulo wheel

* add gha cache

* move modelica install after e+ install as modelica build step takes longer

* reduce image size to 1.8GB

* change apt to apt-get for api stability and dont install recommends for OpenStudio
  • Loading branch information
TShapinsky authored Aug 2, 2024
1 parent 28ef41c commit 5cc5212
Show file tree
Hide file tree
Showing 2 changed files with 297 additions and 91 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,26 @@ jobs:
build-image:
name: Build image
runs-on: ubuntu-latest
timeout-minutes: 20
# timeout-minutes: 40
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log into container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
id: meta
with:
images: |
Expand All @@ -38,11 +44,17 @@ jobs:
type=sha
type=semver,pattern={{version}},enable=${{ github.event_name == 'release' }}
type=semver,pattern={{major}},enable=${{ github.event_name == 'release' }}
type=semver,pattern={{major}}.{{minor}},enable=${{ github.event_name == 'release' }}
type=edge
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
push: true
target: alfalfa-dependencies
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.output.labels }}
labels: ${{ steps.meta.output.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Loading

0 comments on commit 5cc5212

Please sign in to comment.