Skip to content

Commit

Permalink
handle env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Aug 10, 2023
1 parent 023d09b commit 38e67e7
Showing 1 changed file with 43 additions and 32 deletions.
75 changes: 43 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,40 +38,51 @@ env:
EXAMPLES: 'yes'

jobs:
docker_wine_cache:
name: 'Build MinGW/MSVC Debian image'
env_vars:
name: 'Put environment variables into a standard job output'
runs-on: ubuntu-latest
outputs:
env_vars: ${{ steps.result.outputs.env_vars }}
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build container
uses: docker/build-push-action@v4
with:
file: ./ci/linux-debian-wine.Dockerfile
tags: ci-image
push: false
load: false
cache-from: type=gha
cache-to: type=gha,mode=min

mingw_debian:
name: ${{ matrix.configuration.job_name }}
needs: docker_wine_cache
strategy:
fail-fast: false
matrix:
configuration:
- job_name: 'x86_64 (mingw32-w64): Windows (Debian stable, Wine)'
env_vars: 'HOST=x86_64-w64-mingw32'
- job_name: 'i686 (mingw32-w64): Windows (Debian stable, Wine)'
env_vars: 'HOST=i686-w64-mingw32'
uses: ./.github/workflows/run-in-docker.yml
with:
dockerfile: ./ci/linux-debian-wine.Dockerfile
tag: ci-image
job_env_vars: 'WRAPPER_CMD=wine WITH_VALGRIND=no ECDH=yes RECOVERY=yes SCHNORRSIG=yes CTIMETESTS=no'
matrix_env_vars: ${{ matrix.configuration.env_vars }}
- id: result
run: |
echo $(echo '${{ toJSON(env) }}' | jq -r 'to_entries | .[] | "\(.key)=\"\(.value)\""' | paste -sd " ") >> $GITHUB_OUTPUT
echo $(echo '${{ toJSON(env) }}' | jq -r 'to_entries | .[] | "\(.key)=\"\(.value)\""' | paste -sd " ")
# docker_wine_cache:
# name: 'Build MinGW/MSVC Debian image'
# runs-on: ubuntu-latest
# steps:
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2

# - name: Build container
# uses: docker/build-push-action@v4
# with:
# file: ./ci/linux-debian-wine.Dockerfile
# tags: ci-image
# push: false
# load: false
# cache-from: type=gha
# cache-to: type=gha,mode=min

# mingw_debian:
# name: ${{ matrix.configuration.job_name }}
# needs: docker_wine_cache
# strategy:
# fail-fast: false
# matrix:
# configuration:
# - job_name: 'x86_64 (mingw32-w64): Windows (Debian stable, Wine)'
# env_vars: 'HOST=x86_64-w64-mingw32'
# - job_name: 'i686 (mingw32-w64): Windows (Debian stable, Wine)'
# env_vars: 'HOST=i686-w64-mingw32'
# uses: ./.github/workflows/run-in-docker.yml
# with:
# dockerfile: ./ci/linux-debian-wine.Dockerfile
# tag: ci-image
# job_env_vars: 'WRAPPER_CMD=wine WITH_VALGRIND=no ECDH=yes RECOVERY=yes SCHNORRSIG=yes CTIMETESTS=no'
# matrix_env_vars: ${{ matrix.configuration.env_vars }}

# msvc_debian:
# name: ${{ matrix.configuration.job_name }}
Expand Down

0 comments on commit 38e67e7

Please sign in to comment.