0.9.16 #190
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
# on: push | |
# on: workflow_dispatch | |
on: | |
workflow_dispatch: | |
release: | |
types: | |
- created | |
env: | |
DTLV_ARCH: amd64 | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
steps: | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Get Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '23' | |
- name: Install Lein | |
uses: knicknic/[email protected] | |
with: | |
macos: | | |
brew install leiningen | |
linux: | | |
curl -O https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein | |
chmod a+x lein | |
mv lein /usr/local/bin/ | |
- name: Run Tests then Uberjar | |
run: | | |
lein run | |
lein uberjar | |
echo "Generated JAR files:" | |
ls -l target/*.jar | |
- name: Upload Uberjar | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: target/datalevin-${{ github.event.release.tag_name }}-standalone.jar | |
overwrite: true | |
- name: Setup Graalvm | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: '23' | |
distribution: 'graalvm' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Native Datalevin | |
uses: knicknic/[email protected] | |
with: | |
macos: | | |
export DTLV_OS=macos | |
bash script/compile-native | |
linux: | | |
export DTLV_OS=linux | |
bash script/compile-native | |
- name: Run Native Tests | |
run: | | |
./dtlv-test0 | |
- name: Zip Binary | |
run: | | |
7z a -tzip dtlv-${{ github.event.release.tag_name }}-${{ matrix.os}}-amd64.zip dtlv | |
- name: Upload Binary | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: dtlv-${{ github.event.release.tag_name }}-${{ matrix.os }}-amd64.zip | |
overwrite: true |