-
Notifications
You must be signed in to change notification settings - Fork 35
70 lines (58 loc) · 1.72 KB
/
test-cobj-api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: cobj-api tests
on:
workflow_call:
inputs:
os:
required: true
type: string
configure-args:
required: false
type: string
default: ""
permissions:
contents: read
env:
CLASSPATH: ":/usr/lib/opensourcecobol4j/libcobj.jar"
jobs:
test-other:
runs-on: ubuntu-latest
container:
image: ${{ inputs.os }}
steps:
- name: Get the artifact name
run: echo "ARTIFACT_NAME=${{ inputs.os }}" | sed 's/:/-/g' >> "$GITHUB_ENV"
- uses: actions/download-artifact@v4
with:
name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}-opt_${{ inputs.configure-args }}
- uses: actions/setup-java@v4
if: inputs.os != 'amazonlinux:2023'
with:
distribution: 'temurin'
java-version: '11'
- name: Install dependencies on Ubuntu 24.04
if: inputs.os == 'ubuntu:24.04'
run: |
apt-get update -y
apt-get install -y build-essential
- name: Install dependencies on AlmaLinux 9
if: inputs.os == 'almalinux:9'
run: |
dnf -y update
dnf install -y gcc make diffutils glibc-gconv-extra
- name: Install dependencies on Amazon Linux 2023
if: inputs.os == 'amazonlinux:2023'
run: |
dnf -y update
dnf install -y gcc make diffutils tar gzip
- name: Install Java
if: inputs.os == 'amazonlinux:2023'
run: |
dnf install -y java-11-amazon-corretto-devel
- name: Install opensource COBOL 4J
run: |
tar zxf opensourcecobol4j.tar.gz
mv opensourcecobol4j/* .
make install
- name: Run tests cobj-api
run:
make test-cobj-api