Skip to content

Commit 337942f

Browse files
committed
#76 Update xercesc build workflow
1 parent df7ae7a commit 337942f

File tree

1 file changed

+40
-16
lines changed

1 file changed

+40
-16
lines changed

.github/workflows/xercesc.yml

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: xercesc
1+
name: Build Xerces-C
22

33
on:
44
workflow_dispatch:
55
inputs:
66
xercesc_ver:
7-
description: "XercesC version"
7+
description: "Xerces-C version"
88
required: true
99
type: string
1010
default: "3.2.4"
@@ -14,26 +14,50 @@ on:
1414
required: true
1515
type: choice
1616
options:
17-
- "ubuntu:22.04"
18-
- "ubuntu:24.04"
19-
default: "ubuntu:24.04"
17+
- "ubuntu-22.04"
18+
- "ubuntu-24.04"
19+
default: "ubuntu-22.04"
20+
21+
defaults:
22+
run:
23+
shell: bash --login -e -o pipefail {0} # login for environment modules
24+
working-directory: ./scripts/custom
2025

2126
jobs:
2227
setup:
23-
name: build and cache xercesc
28+
name: Build Xerces-C ${{ github.event.inputs.xercesc_ver }}
2429

25-
runs-on: ubuntu-latest
26-
container:
27-
image: ${{ github.event.inputs.os }}
30+
runs-on: ${{ github.event.inputs.os }}
2831

2932
steps:
30-
- name: checkout
33+
- name: Checkout
3134
uses: actions/checkout@v4
3235

33-
- name: setup os
34-
uses: ./.github/actions/setup-defaults
36+
- name: Set env
37+
run: |
38+
source /etc/os-release
39+
OS_ID="$(echo ${ID}${VERSION_ID} | sed 's/\.//')"
40+
echo "OS_ID=${OS_ID}" >> $GITHUB_ENV
41+
echo "MODULES_DIR=$HOME/modules" >> $GITHUB_ENV
42+
echo "XERCESC_VER=${{ github.event.inputs.xercesc_ver }}" >> $GITHUB_ENV
43+
44+
- name: Setup OS
45+
run: |
46+
sudo ./setup_${{ env.OS_ID }}.sh
47+
48+
- name: List environment modules
49+
run: |
50+
module avail
51+
52+
- name: Run build script
53+
run: |
54+
./install_xercesc.sh \
55+
--version=${{ env.XERCESC_VER }} \
56+
--modules-dir=${{ env.MODULES_DIR }}
3557
36-
- name: build and cache
37-
uses: ./.github/actions/setup-xercesc
38-
with:
39-
xercesc_ver: ${{ github.event.inputs.xercesc_ver }}
58+
- name: Test
59+
run: |
60+
module use ${MODULES_DIR}/modulefiles
61+
module avail
62+
module load xercesc/${{ env.XERCESC_VER }}
63+
module test xercesc/${{ env.XERCESC_VER }}

0 commit comments

Comments
 (0)