Fixed build trial #645
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: "Testing known case studies" | |
on: | |
push: | |
branches: | |
- "master" | |
- "develop" | |
concurrency: | |
group: Testing known case studies | |
cancel-in-progress: true | |
jobs: | |
build-and-test: | |
strategy: | |
matrix: | |
jabba_jdk: [temurin@17, amazon-corretto@17, zulu@17, microsoft@17] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build java | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y curl bash build-essential libssl-dev pkg-config dos2unix mingw-w64 musl-dev musl-tools dos2unix | |
cd ${{ github.workspace }} | |
# for whatever reason, for the moment nothing seems to work except an extreme manual approach. | |
# this should be corrected later when misterious external errors stop happening | |
wget -c https://github.com/Jabba-Team/jabba/releases/download/0.13.0/jabba-0.13.0-linux-amd64 -O ./jabba-linux-amd64 | |
chmod +x jabba-linux-amd64 | |
./jabba-linux-amd64 install ${{ matrix.jabba_jdk }} -o /opt/jdk | |
export JAVA_HOME=/opt/jdk | |
export PATH=$PATH:$JAVA_HOME/bin | |
dos2unix ./gradlew # make sure that gradlew is not with CRLF | |
./gradlew publishModules | |
curl -fL "https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux-static.gz" | gzip -d > cs | |
chmod +x ./cs | |
./cs setup --yes | |
sbt publishModules | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y | |
source "$HOME/.cargo/env" | |
cargo build --release | |
cp ./target/release/idesyde-orchestration idesyde | |
python -m pip install robotframework | |
python -m robot --loglevel DEBUG --exclude slow TestsBenchmark.robot | |
- uses: actions/upload-artifact@v3 | |
if: success() || failure() | |
with: | |
name: test case logs | |
path: | | |
log.html | |
report.html | |
# - name: Cache-out java imodules | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{ github.workspace }}/imodules | |
# key: java-imodules-${{ github.ref }}-${{ matrix.jabba_jdk }} | |
# - name: Cache-out java emodules | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{ github.workspace }}/emodules | |
# key: java-emodules-${{ github.ref }}-${{ matrix.jabba_jdk }} | |
# build-scala: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Build scala | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install -y curl bash build-essential libssl-dev pkg-config dos2unix | |
# cd ${{ github.workspace }} | |
# - name: Cache-out scala imodules | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{ github.workspace }}/imodules | |
# key: scala-imodules-${{ github.ref }} | |
# - name: Cache-out scala emodules | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{ github.workspace }}/emodules | |
# key: scala-emodules-${{ github.ref }} | |
# build-rust: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Build rust | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install -y curl bash build-essential libssl-dev pkg-config mingw-w64 musl-dev musl-tools | |
# cd ${{ github.workspace }} | |
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y | |
# source "$HOME/.cargo/env" | |
# cargo build --release | |
# cp ./target/release/idesyde-orchestration idesyde | |
# - name: Cache-out rust | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{ github.workspace }}/idesyde | |
# key: idesyde-${{ github.ref }} | |
# test-on-linux: | |
# strategy: | |
# matrix: | |
# jabba_jdk: [temurin@17, amazon-corretto@17, zulu@17, microsoft@17] | |
# runs-on: ubuntu-latest | |
# needs: [build-java, build-scala, build-rust] | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-python@v4 | |
# with: | |
# python-version: '3.10' | |
# - name: Cache-in java imodules | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{ github.workspace }}/java-imodules | |
# key: java-imodules-${{ github.ref }}-${{ matrix.jabba_jdk }} | |
# restore-keys: | | |
# java-imodules-${{ github.ref }}- | |
# java-imodules- | |
# - name: Cache-in java emodules | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{ github.workspace }}/java-emodules | |
# key: java-emodules-${{ github.ref }}-${{ matrix.jabba_jdk }} | |
# restore-keys: | | |
# java-emodules-${{ github.ref }}- | |
# java-emodules- | |
# - name: Cache-in scala imodules | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{ github.workspace }}/scala-imodules | |
# key: scala-imodules-${{ github.ref }} | |
# restore-keys: | | |
# scala-imodules- | |
# - name: Cache-in scala emodules | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{ github.workspace }}/scala-emodules | |
# key: scala-emodules-${{ github.ref }} | |
# restore-keys: | | |
# scala-emodules- | |
# - name: Cache-in rust | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{ github.workspace }}/idesyde | |
# key: idesyde-${{ github.ref }} | |
# - name: Build and Test cases | |
# continue-on-error: true | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install -y curl bash build-essential libssl-dev pkg-config mingw-w64 musl-dev musl-tools dos2unix | |
# cd ${{ github.workspace }} | |
# mkdir -p imodules | |
# mkdir -p emodules | |
# cp -r java-imodules/* imodules/ | |
# cp -r scala-imodules/* imodules/ | |
# cp -r java-emodules/* emodules/ | |
# cp -r scala-emodules/* emodules/ | |
# python -m pip install robotframework | |
# python -m robot --exclude slow TestsBenchmark.robot | |
# - name: Upload Robot Log | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: test-build-log-${{ github.ref }}.html | |
# path: log.html | |
# - name: Cache-out outputs | |
# uses: actions/cache@v3 | |
# with: | |
# enableCrossOsArchive: true | |
# path: ${{ github.workspace }}/dist | |
# key: dist-${{ github.ref }}-${{ matrix.jabba_jdk }} | |
# test-cases-linux: | |
# strategy: | |
# matrix: | |
# jabba_jdk: [temurin@17, amazon-corretto@17, zulu@17, microsoft@17] | |
# target: [x86_64-unknown-linux-musl] | |
# runs-on: ubuntu-latest | |
# needs: build-on-linux | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Cache-in outputs | |
# uses: actions/cache@v3 | |
# with: | |
# enableCrossOsArchive: true | |
# path: ${{ github.workspace }}/dist | |
# dist- key: ${{ github.ref }}-${{ matrix.jabba_jdk }} | |
# - uses: actions/setup-python@v4 | |
# with: | |
# python-version: '3.10' | |
# - run: | | |
# cd ${{ github.workspace }} | |
# cp -r ${{ github.workspace }}/dist/x86_64-unknown-linux-musl/* . | |
# mkdir -p /opt/jdk | |
# curl -sL https://github.com/Jabba-Team/jabba/raw/main/install.sh | JABBA_COMMAND="install ${{ matrix.jabba_jdk }} -o /opt/jdk" bash | |
# export JAVA_HOME=/opt/jdk | |
# export PATH="$JAVA_HOME/bin:$PATH" | |
# python -m pip install robotframework | |
# python -m robot --exclude slow TestsBenchmark.robot | |
# test-cases-win: | |
# strategy: | |
# matrix: | |
# jabba_jdk: [temurin@17, amazon-corretto@17, zulu@17, microsoft@17] | |
# runs-on: windows-latest | |
# needs: build-on-linux | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-python@v4 | |
# with: | |
# python-version: '3.10' | |
# - name: Cache-in outputs | |
# uses: actions/cache@v3 | |
# with: | |
# enableCrossOsArchive: true | |
# path: ${{ github.workspace }}/dist | |
# dist- key: ${{ github.ref }}-${{ matrix.jabba_jdk }} | |
# - run: | | |
# cd ${{ github.workspace }} | |
# cp -r ${{ github.workspace }}/dist/x86_64-pc-windows-gnu/* . | |
# [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
# Invoke-Expression ( | |
# Invoke-WebRequest https://github.com/Jabba-Team/jabba/raw/master/install.ps1 -UseBasicParsing | |
# ).Content | |
# jabba install ${{ matrix.jabba_jdk }} | |
# jabba alias default ${{ matrix.jabba_jdk }} | |
# python -m pip install robotframework | |
# python -m robot --exclude slow TestsBenchmark.robot |