forked from scipy/scipy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request scipy#16066 from melissawm/gitpod-meson
DEV,BLD: Move to meson on gitpod
- Loading branch information
Showing
10 changed files
with
288 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
name: Build Base Docker Image | ||
|
||
# Triggered only if environment.yml in main changes | ||
# Triggered only if environment_meson.yml in main changes | ||
# Pushes a Docker image with all dev dependencies to Docker Hub | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
# will keep both until there is a reason to get rid of scipy-dev entirely | ||
- 'environment_meson.yml' | ||
- 'environment.yml' | ||
|
||
jobs: | ||
build: | ||
build-dev-base: | ||
name: Build base Docker image | ||
runs-on: ubuntu-latest | ||
environment: scipy-dev | ||
|
@@ -34,12 +36,52 @@ jobs: | |
id: getrefs | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Cache Docker layers | ||
uses: actions/cache@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: ${{ runner.os }}-buildx- | ||
context: "." | ||
file: "./tools/docker_dev/meson.Dockerfile" | ||
push: ${{ github.event_name != 'pull_request' }} | ||
# https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#github-cache | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
tags: | | ||
scipy/scipy-dev:${{ steps.getrefs.outputs.date }}-${{ steps.getrefs.outputs.branch}}-${{ steps.getrefs.outputs.sha8 }} | ||
scipy/scipy-dev:latest | ||
- name: Image digest | ||
# Return details of the image build: sha and shell | ||
run: echo ${{ steps.docker_build.outputs.digest }} | ||
|
||
build-meson-base: | ||
name: Build base Docker image | ||
runs-on: ubuntu-latest | ||
environment: scipy-dev | ||
if: "github.repository_owner == 'scipy' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')" | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Lint Docker | ||
uses: brpaz/[email protected] | ||
with: | ||
dockerfile: ./tools/docker_dev/meson.Dockerfile | ||
- name: Get refs | ||
shell: bash | ||
run: | | ||
export raw_branch=${GITHUB_REF#refs/heads/} | ||
echo "::set-output name=branch::${raw_branch//\//-}" | ||
echo "::set-output name=date::$(date +'%Y%m%d')" | ||
echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" | ||
id: getrefs | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
|
@@ -55,7 +97,8 @@ jobs: | |
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache | ||
tags: | | ||
scipy/scipy-dev:${{ steps.getrefs.outputs.date }}-${{ steps.getrefs.outputs.branch}}-${{ steps.getrefs.outputs.sha8 }}, scipy/scipy-dev:latest | ||
scipy/scipy-meson:${{ steps.getrefs.outputs.date }}-${{ steps.getrefs.outputs.branch}}-${{ steps.getrefs.outputs.sha8 }} | ||
scipy/scipy-meson:latest | ||
- name: Image digest | ||
# Return details of the image build: sha and shell | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,5 +42,7 @@ dependencies: | |
# For CLI | ||
- rich-click | ||
- click | ||
# Else Docker raise a warning | ||
- pip | ||
- pip: | ||
- doit==0.35.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,5 +45,7 @@ dependencies: | |
# For CLI | ||
- rich-click | ||
- click | ||
# Else Docker raise a warning | ||
- pip | ||
- pip: | ||
- doit==0.35.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.