Skip to content

Commit

Permalink
Add multiplatform CI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrueden committed Oct 2, 2024
1 parent b3b43c3 commit 29a21d9
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/main/ci-build.sh
sh ci-build.sh
10 changes: 10 additions & 0 deletions .github/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/main/ci-setup-github-actions.sh
sh ci-setup-github-actions.sh

# Let the Linux build handle artifact deployment.
if [ "$(uname)" != Linux ]
then
echo "No deploy -- non-Linux build"
echo "NO_DEPLOY=1" >> $GITHUB_ENV
fi
54 changes: 54 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: build

on:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- "*-[0-9]+.*"

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'zulu'
cache: 'maven'

- name: Cache Appose environments
id: cache-appose
uses: actions/cache@v4
with:
path: ~/.local/share/appose
key: ${{ runner.os }}-build-appose-${{ hashFiles('*') }}
restore-keys: |
${{ runner.os }}-build-appose-
- name: Set up CI environment
run: .github/setup.sh
shell: bash

- name: Execute the build
run: .github/build.sh
shell: bash
env:
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
OSSRH_PASS: ${{ secrets.OSSRH_PASS }}
SIGNING_ASC: ${{ secrets.SIGNING_ASC }}

0 comments on commit 29a21d9

Please sign in to comment.