Skip to content

Commit

Permalink
eliminate boilerplate artifact name field from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbkoch committed Jul 25, 2024
1 parent 22b7721 commit b3c1f59
Showing 1 changed file with 27 additions and 35 deletions.
62 changes: 27 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,34 @@ jobs:
image: ubuntu-20.04
options: "-release_64"
asm: "-asm"
artifact_name: "libebm_ubuntu_release_64"
- name: linux_debug_64
image: ubuntu-20.04
options: "-debug_64"
asm: ""
artifact_name: "libebm_ubuntu_debug_64"
- name: mac_release_64
image: macos-13 # macos-13 is an intel based mac
options: "-release_64"
asm: "-asm"
artifact_name: "libebm_mac_release_64"
- name: mac_debug_64
image: macos-13 # macos-13 is an intel based mac
options: "-debug_64"
asm: ""
artifact_name: "libebm_mac_debug_64"
- name: mac_release_arm
image: macos-14 # macos-14 is an ARM based mac
options: "-release_arm"
asm: "-asm"
artifact_name: "libebm_mac_release_arm"
- name: mac_debug_arm
image: macos-14 # macos-14 is an ARM based mac
options: "-debug_arm"
asm: ""
artifact_name: "libebm_mac_debug_arm"
- name: win_release_64
image: windows-2022
options: "-release_64"
asm: ""
artifact_name: "libebm_win_release_64"
- name: win_debug_64
image: windows-2022
options: "-debug_64"
asm: ""
artifact_name: "libebm_win_debug_64"
runs-on: ${{ matrix.image }}
steps:
- name: Check out repo
Expand All @@ -76,13 +68,13 @@ jobs:
- name: Publish shared library
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
name: libebm_${{ matrix.name }}
path: bld/lib
- name: Publish assembly
if: ${{ matrix.asm != '' }}
uses: actions/upload-artifact@v4
with:
name: asm-${{ matrix.artifact_name }}
name: asm_${{ matrix.name }}
path: bld/asm/

vis:
Expand Down Expand Up @@ -203,66 +195,66 @@ jobs:
include:
- name: linux_release_64
image: ubuntu-latest
options: "-release_64 -existing_release_64"
options: "-release_64"
existing: "-existing_release_64"
scheduled: "-valgrind"
artifact_name: "libebm_ubuntu_release_64"
- name: linux_debug_64
image: ubuntu-latest
options: "-debug_64 -existing_debug_64"
options: "-debug_64"
existing: "-existing_debug_64"
scheduled: "-valgrind"
artifact_name: "libebm_ubuntu_debug_64"
- name: linux_release_32
image: ubuntu-latest
options: "-release_32"
existing: ""
scheduled: "-valgrind"
artifact_name: ""
- name: linux_debug_32
image: ubuntu-latest
options: "-debug_32"
existing: ""
scheduled: "-valgrind"
artifact_name: ""
- name: mac_release_64
image: macos-13 # macos-13 is an intel based mac
options: "-release_64 -existing_release_64"
options: "-release_64"
existing: "-existing_release_64"
scheduled: ""
artifact_name: "libebm_mac_release_64"
- name: mac_debug_64
image: macos-13 # macos-13 is an intel based mac
# don't use the existing debug library since we want to rebuild with asan
options: "-debug_64 -asan"
existing: ""
scheduled: ""
artifact_name: ""
- name: mac_release_arm
image: macos-latest
options: "-release_arm -existing_release_arm"
options: "-release_arm"
existing: "-existing_release_arm"
scheduled: ""
artifact_name: "libebm_mac_release_arm"
- name: mac_debug_arm
image: macos-latest
# don't use the existing debug library since we want to rebuild with asan
options: "-debug_arm -asan"
existing: ""
scheduled: ""
artifact_name: ""
- name: win_release_64
image: windows-latest
options: "-release_64 -existing_release_64"
options: "-release_64"
existing: "-existing_release_64"
scheduled: "-analysis"
artifact_name: "libebm_win_release_64"
- name: win_debug_64
image: windows-latest
options: "-debug_64 -existing_debug_64"
options: "-debug_64"
existing: "-existing_debug_64"
scheduled: ""
artifact_name: "libebm_win_debug_64"
- name: win_release_32
image: windows-latest
options: "-release_32"
existing: ""
scheduled: "-analysis"
artifact_name: ""
- name: win_debug_32
image: windows-latest
options: "-debug_32"
existing: ""
scheduled: ""
artifact_name: ""
runs-on: ${{ matrix.image }}
steps:
- name: Check out repo
Expand All @@ -272,30 +264,30 @@ jobs:
with:
python-version: 3.9
- name: Download libebm artifact
if: ${{ matrix.artifact_name != '' }}
if: ${{ matrix.existing != '' }}
uses: actions/download-artifact@v4
with:
name: ${{ matrix.artifact_name }}
name: libebm_${{ matrix.name }}
path: bld/lib
- name: mac test_native
if: ${{ startsWith(matrix.image, 'macos') }}
run: |
/bin/sh ./shared/libebm/tests/libebm_test.sh ${{ matrix.options }}
/bin/sh ./shared/libebm/tests/libebm_test.sh ${{ matrix.options }} ${{ matrix.existing }}
- name: linux test_native (CI)
if: ${{ startsWith(matrix.image, 'ubuntu') && github.event_name != 'schedule' }}
run: |
/bin/sh ./shared/libebm/tests/libebm_test.sh ${{ matrix.options }}
/bin/sh ./shared/libebm/tests/libebm_test.sh ${{ matrix.options }} ${{ matrix.existing }}
- name: linux test_native (Schedule)
if: ${{ startsWith(matrix.image, 'ubuntu') && github.event_name == 'schedule' }}
run: |
/bin/sh ./shared/libebm/tests/libebm_test.sh ${{ matrix.options }} ${{ matrix.scheduled }}
/bin/sh ./shared/libebm/tests/libebm_test.sh ${{ matrix.options }} ${{ matrix.existing }} ${{ matrix.scheduled }}
- name: win test_native (CI)
if: ${{ startsWith(matrix.image, 'windows') && github.event_name != 'schedule' }}
run: |
$env:PATH += ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin'
.\shared\libebm\tests\libebm_test.bat ${{ matrix.options }}
.\shared\libebm\tests\libebm_test.bat ${{ matrix.options }} ${{ matrix.existing }}
- name: win test_native (Schedule)
if: ${{ startsWith(matrix.image, 'windows') && github.event_name == 'schedule' }}
run: |
$env:PATH += ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin'
.\shared\libebm\tests\libebm_test.bat ${{ matrix.options }} ${{ matrix.scheduled }}
.\shared\libebm\tests\libebm_test.bat ${{ matrix.options }} ${{ matrix.existing }} ${{ matrix.scheduled }}

0 comments on commit b3c1f59

Please sign in to comment.