Skip to content

Commit ee7a080

Browse files
committed
#76 Update xsd build workflow
1 parent 8c66d01 commit ee7a080

File tree

1 file changed

+39
-15
lines changed

1 file changed

+39
-15
lines changed

.github/workflows/xsd.yml

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: xsd
1+
name: Build XSD
22

33
on:
44
workflow_dispatch:
@@ -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 xsd
28+
name: Build XSD ${{ github.event.inputs.xsd_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 "XSD_VER=${{ github.event.inputs.xsd_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_xsd.sh \
55+
--version=${{ env.XSD_VER }} \
56+
--modules-dir=${{ env.MODULES_DIR }}
3557
36-
- name: build and cache
37-
uses: ./.github/actions/setup-xsd
38-
with:
39-
xsd_ver: ${{ github.event.inputs.xsd_ver }}
58+
- name: Test
59+
run: |
60+
module use ${MODULES_DIR}/modulefiles
61+
module avail
62+
module load xsd/${{ env.XSD_VER }}
63+
module test xsd/${{ env.XSD_VER }}

0 commit comments

Comments
 (0)