Skip to content

Commit

Permalink
Revert "Changes to CI to make caching work when running on different …
Browse files Browse the repository at this point in the history
…machines (in one pipeline run with same platform jobs)"

This reverts commit 2200e52.
  • Loading branch information
0x17 committed Aug 14, 2024
1 parent 2200e52 commit 9e93e1c
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 45 deletions.
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
stages:
- fetch-scripts
- install-gams
- build
- test
- pack
Expand All @@ -8,11 +9,10 @@ stages:

include:
- project: 'devel/ciscripts'
ref: distributed-caching
file: '.fetch-job.yml'
file: .install-jobs.yml
- project: 'devel/ciscripts'
ref: distributed-caching
file: .shared-vars.yml
- 'ci/.gitlab-ci-06-gams.yml'
- 'ci/.gitlab-ci-09-build.yml'
- 'ci/.gitlab-ci-12-test.yml'
- 'ci/.gitlab-ci-15-pack.yml'
Expand Down
11 changes: 11 additions & 0 deletions ci/.gitlab-ci-06-gams.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
install-gams-leg:
extends: .install-gams-leg

install-gams-deg:
extends: .install-gams-deg

install-gams-dac:
extends: .install-gams-dac

install-gams-wei:
extends: .install-gams-wei
26 changes: 8 additions & 18 deletions ci/.gitlab-ci-09-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ build-dac:
variables:
qtpath: /Users/gitlab/Qt/${QT_VERSION}/macos/bin
script:
- !reference [.get-gams]
- !reference [.gams-folder-dac]
- printf "GAMS_DISTRIB=$HOME/cache/gams-installs/`cat gams_folder_dac.txt`\n" > gamsinclude.pri
- printf "GAMS_DISTRIB_C_API=\$\$GAMS_DISTRIB/apifiles/C/api\n" >> gamsinclude.pri
- printf "GAMS_DISTRIB_CPP_API=\$\$GAMS_DISTRIB/apifiles/C++/api\n" >> gamsinclude.pri
- mkdir build && cd build
- GAMS_CORE_PATH="${GAMS_FOR_MACOS}"
- PATH="${qtpath}:${GAMS_FOR_MACOS}:${PATH}"
- qmake ../gams-mii.pro CONFIG+=release && make -j4
needs: [fetch-ci-scripts]
needs: [install-gams-dac]
artifacts:
name: mii-dac
expire_in: 2 hours
Expand All @@ -25,33 +23,29 @@ build-deg:
variables:
qtpath: /Users/gitlab/Qt/${QT_VERSION}/macos/bin
script:
- !reference [.get-gams]
- !reference [.gams-folder-deg]
- printf "GAMS_DISTRIB=$HOME/cache/gams-installs/`cat gams_folder_deg.txt`\n" > gamsinclude.pri
- printf "GAMS_DISTRIB_C_API=\$\$GAMS_DISTRIB/apifiles/C/api\n" >> gamsinclude.pri
- printf "GAMS_DISTRIB_CPP_API=\$\$GAMS_DISTRIB/apifiles/C++/api\n" >> gamsinclude.pri
- mkdir build && cd build
- GAMS_CORE_PATH="${GAMS_FOR_MACOS}"
- PATH="${qtpath}:${GAMS_FOR_MACOS}:${PATH}"
- qmake ../gams-mii.pro CONFIG+=release && make -j4
needs: [fetch-ci-scripts]
needs: [install-gams-deg]
artifacts:
name: mii-deg
expire_in: 2 hours
paths: [build]

build-leg:
stage: build
tags: [linux]
tags: [puma]
image:
name: $GAMS_CONTAINER_REGISTRY/qt-machines/leg/${QT_IMAGE_VERSION}:latest
entrypoint: [""] # prevent startup.sh
needs: [fetch-ci-scripts]
needs: [install-gams-leg]
variables:
DOLLAR_GAMS: $$$$GAMS_DISTRIB
script:
- !reference [.get-gams]
- !reference [.gams-folder-leg]
- echo "GAMS_DISTRIB=/cache/gams-installs/`cat gams_folder_leg.txt`" > gamsinclude.pri
- echo "GAMS_DISTRIB_C_API=$DOLLAR_GAMS/apifiles/C/api" >> gamsinclude.pri
- echo "GAMS_DISTRIB_CPP_API=$DOLLAR_GAMS/apifiles/C++/api" >> gamsinclude.pri
Expand All @@ -64,15 +58,13 @@ build-leg:

build-wei:
stage: build
tags: [windows]
needs: [fetch-ci-scripts]
tags: [pond]
needs: [install-gams-wei]
variables:
cmd_vcvars: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat
image:
name: $GAMS_CONTAINER_REGISTRY/qt-machines/wei/${QT_IMAGE_VERSION}:latest
script:
- !reference [.get-gams-wei]
- !reference [.gams-folder-wei]
- '& $cmd_vcvars'
- $data =
"GAMS_DISTRIB=C:/Cache/gams-installs/$(Get-Content mygmsdir.tmp -Raw)",
Expand All @@ -94,15 +86,13 @@ build-wei-debug:
- if: $PF_WEI_DEBUG == "0"
when: never
- when: on_success
tags: [windows]
needs: [fetch-ci-scripts]
tags: [pond]
needs: [install-gams-wei]
variables:
cmd_vcvars: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat
image:
name: $GAMS_CONTAINER_REGISTRY/qt-machines/wei/${QT_IMAGE_VERSION}:latest
script:
- !reference [.get-gams-wei]
- !reference [.gams-folder-wei]
- '& $cmd_vcvars'
- $data =
"GAMS_DISTRIB=C:/Cache/gams-installs/$(Get-Content mygmsdir.tmp -Raw)",
Expand Down
20 changes: 6 additions & 14 deletions ci/.gitlab-ci-12-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ test-dac:
stage: test
tags: [macos-arm64]
allow_failure: true
dependencies: [build-dac]
dependencies: [install-gams-dac,build-dac]
variables:
qtpath: /Users/gitlab/Qt/${QT_VERSION}/macos/bin
script:
- !reference [.get-gams]
- !reference [.gams-folder-dac]
- GAMS_PATH=$HOME/cache/gams-installs/`cat gams_folder_dac.txt`
- PATH="${qtpath}:${GAMS_PATH}:${PATH}"
- cd build && mkdir reports
Expand All @@ -31,12 +29,10 @@ test-deg:
stage: test
tags: [macos]
allow_failure: true
dependencies: [build-deg]
dependencies: [install-gams-deg,build-deg]
variables:
qtpath: /Users/gitlab/Qt/${QT_VERSION}/macos/bin
script:
- !reference [.get-gams]
- !reference [.gams-folder-deg]
- GAMS_PATH=$HOME/cache/gams-installs/`cat gams_folder_deg.txt`
- PATH="${qtpath}:${GAMS_PATH}:${PATH}"
- cd build && mkdir reports
Expand All @@ -58,15 +54,13 @@ test-deg:

test-leg:
stage: test
tags: [linux]
tags: [puma]
allow_failure: true
image:
name: $GAMS_CONTAINER_REGISTRY/qt-machines/leg/${QT_IMAGE_VERSION}:latest
entrypoint: [""] # prevent startup.sh
dependencies: [build-leg]
dependencies: [install-gams-leg,build-leg]
script:
- !reference [.get-gams]
- !reference [.gams-folder-leg]
- GAMS_PATH=/cache/gams-installs/`cat gams_folder_leg.txt`
- cd build && mkdir reports
- REPORTS_DIR=$(pwd)/reports
Expand All @@ -87,14 +81,12 @@ test-leg:

test-wei:
stage: test
tags: [windows]
tags: [pond]
allow_failure: true
image:
name: $GAMS_CONTAINER_REGISTRY/qt-machines/wei/${QT_IMAGE_VERSION}:latest
dependencies: [build-wei]
dependencies: [install-gams-wei,build-wei]
script:
- !reference [.get-gams-wei]
- !reference [.gams-folder-wei]
- $gmsdirname = Get-Content mygmsdir.tmp -Raw
- $GAMS_PATH = "C:\Cache\gams-installs\$gmsdirname"
- $WORKSPACE = $([System.IO.Directory]::GetCurrentDirectory())
Expand Down
6 changes: 3 additions & 3 deletions ci/.gitlab-ci-15-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pack-deg:

pack-leg:
stage: pack
tags: [linux]
tags: [puma]
image:
name: $GAMS_CONTAINER_REGISTRY/qt-machines/leg/${QT_IMAGE_VERSION}:latest
entrypoint: [""] # prevent startup.sh
Expand All @@ -126,7 +126,7 @@ pack-leg:

pack-wei:
stage: pack
tags: [windows]
tags: [pond]
image:
name: $GAMS_CONTAINER_REGISTRY/qt-machines/wei/${QT_IMAGE_VERSION}:latest
needs: [build-wei]
Expand Down Expand Up @@ -167,7 +167,7 @@ pack-wei-debug:
- if: $PF_WEI_DEBUG == "0"
when: never
- when: always
tags: [windows]
tags: [pond]
image:
name: $GAMS_CONTAINER_REGISTRY/qt-machines/wei/${QT_IMAGE_VERSION}:latest
needs: [build-wei-debug]
Expand Down
8 changes: 3 additions & 5 deletions ci/.gitlab-ci-20-analyze.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
codechecker-leg:
stage: analyze
tags: [linux]
tags: [puma]
image:
name: $GAMS_CONTAINER_REGISTRY/qt-machines/leg/analyzer:latest
entrypoint: [""] # prevent startup.sh
needs: [fetch-ci-scripts]
needs: [install-gams-leg]
allow_failure: false
variables:
DOLLAR_GAMS: $$$$GAMS_DISTRIB
script:
- !reference [.get-gams]
- !reference [.gams-folder-leg]
- echo "GAMS_DISTRIB=/cache/gams-installs/`cat gams_folder_leg.txt`" > gamsinclude.pri
- echo "GAMS_DISTRIB_C_API=$DOLLAR_GAMS/apifiles/C/api" >> gamsinclude.pri
- echo "GAMS_DISTRIB_CPP_API=$DOLLAR_GAMS/apifiles/C++/api" >> gamsinclude.pri
Expand All @@ -25,7 +23,7 @@ codechecker-leg:

license-update-leg:
stage: analyze
tags: [linux]
tags: [puma]
image:
name: $GAMS_CONTAINER_REGISTRY/qt-machines/deployer:latest
entrypoint: [""] # prevent startup.sh
Expand Down
4 changes: 2 additions & 2 deletions ci/.gitlab-ci-24-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
deploy-cloudfront:
stage: deploy
tags: [linux]
tags: [puma]
image:
name: $GAMS_CONTAINER_REGISTRY/qt-machines/deployer:latest
entrypoint: [""] # prevent startup.sh
Expand All @@ -15,7 +15,7 @@ deploy-cloudfront:

deploy-github:
stage: deploy
tags: [linux]
tags: [puma]
image:
name: $GAMS_CONTAINER_REGISTRY/qt-machines/deployer:latest
entrypoint: [""] # prevent startup.sh
Expand Down

0 comments on commit 9e93e1c

Please sign in to comment.