Skip to content

Commit

Permalink
CI: update builds.yml to use latest versions for upload-artifact an…
Browse files Browse the repository at this point in the history
…d `checkout`.

Annoyingly, the new `upload-artifact` requires a new step to merge the outputs in a single package.

To avoid missing libs for the new node.js environment used by `upload-artifact`,  most steps were moved to the host, only the build process itself runs in our container.
  • Loading branch information
PMeira committed Jul 11, 2024
1 parent 2d9301d commit f5728ae
Showing 1 changed file with 28 additions and 17 deletions.
45 changes: 28 additions & 17 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ jobs:
build_linux_x64:
name: 'Linux x64'
runs-on: ubuntu-latest
container:
image: 'docker://pmeira/manylinux_wheel_fpc322_x86_64'
env:
KLUSOLVE_URL: 'https://github.com/dss-extensions/klusolve/releases/download/1.0.0a1/klusolvex_1.0.0a1_linux_x64.tar.gz'
DSS_CAPI_BUILD_ODDIE: '1'
DOCKER_IMAGE: 'pmeira/manylinux_wheel_fpc322_x86_64'
steps:
- name: 'Checkout'
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY dss_capi
cd dss_capi
git checkout $GITHUB_SHA
- name: 'Setup Docker'
run: |
docker pull $DOCKER_IMAGE
- name: 'Download/extract KLUSolve(X)'
run: |
curl -s -L "${KLUSOLVE_URL}" -o klusolve.tar.gz
Expand All @@ -29,15 +31,14 @@ jobs:
- name: Build
run: |
cd dss_capi
export PATH=/opt/python/cp38-cp38/bin/:$PATH
source ./build/make_metadata.sh
./build/build_linux_x64.sh
docker run -e DSS_CAPI_VERSION -e DSS_CAPI_BUILD_ODDIE -v "${PWD}/..:/build" $DOCKER_IMAGE bash -c 'cd /build/dss_capi; PATH=/opt/python/cp38-cp38/bin/:$PATH bash build/build_linux_x64.sh'
ls -lR lib
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v3"
uses: "actions/upload-artifact@v4"
#if: github.event_name == 'release' && github.event.action == 'created'
with:
name: 'development-build'
name: 'development-build-linux_x64'
path: '${{ github.workspace }}/dss_capi/release/*.tar.gz'

build_linux_x86:
Expand Down Expand Up @@ -68,17 +69,17 @@ jobs:
docker run -e DSS_CAPI_VERSION -v "${PWD}/..:/build" $DOCKER_IMAGE bash -c 'cd /build/dss_capi; PATH=/opt/python/cp38-cp38/bin/:$PATH bash build/build_linux_x86.sh'
ls -lR lib
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v3"
uses: "actions/upload-artifact@v4"
#if: github.event_name == 'release' && github.event.action == 'created'
with:
name: 'development-build'
name: 'development-build-linux_x86'
path: '${{ github.workspace }}/dss_capi/release/*.tar.gz'

build_macos_x64:
name: 'macOS x64 and ARM64'
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
path: 'dss_capi'
Expand Down Expand Up @@ -109,10 +110,10 @@ jobs:
./build/build_macos_arm64.sh
ls -lR lib
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v3"
uses: "actions/upload-artifact@v4"
#if: github.event_name == 'release' && github.event.action == 'created'
with:
name: 'development-build'
name: 'development-build-darwin'
path: '${{ github.workspace }}/dss_capi/release/*.tar.gz'

build_win_x64:
Expand All @@ -121,7 +122,7 @@ jobs:
env:
DSS_CAPI_BUILD_ODDIE: '1'
steps:
- uses: actions/checkout@v3
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
path: 'dss_capi'
Expand Down Expand Up @@ -151,17 +152,17 @@ jobs:
call build/generated/set_version.bat
call build/build_win_x64.bat
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v3"
uses: "actions/upload-artifact@v4"
#if: github.event_name == 'release' && github.event.action == 'created'
with:
name: 'development-build'
name: 'development-build-win_x64'
path: '${{ github.workspace }}/dss_capi/release/*.zip'

build_win:
name: 'Windows x86'
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
path: 'dss_capi'
Expand Down Expand Up @@ -189,8 +190,18 @@ jobs:
call build/generated/set_version.bat
call build/build_win_x86.bat
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v3"
uses: "actions/upload-artifact@v4"
#if: github.event_name == 'release' && github.event.action == 'created'
with:
name: 'development-build'
name: 'development-build-win_x86'
path: '${{ github.workspace }}/dss_capi/release/*.zip'

merge:
runs-on: ubuntu-latest
needs: [build_linux_x64, build_linux_x86, build_macos_x64, build_win_x64, build_win]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: development-build
pattern: development-build-*

0 comments on commit f5728ae

Please sign in to comment.