Skip to content

Import from CVS and Build + Test #1447

Import from CVS and Build + Test

Import from CVS and Build + Test #1447

Workflow file for this run

name: Import from CVS and Build + Test
on:
push:
branches: [ cvsimport ]
schedule:
- cron: "0 0 * * *"
jobs:
cvs_import:
name: "Run CVS Import"
runs-on: ubuntu-20.04
outputs:
HAS_NEW_COMMITS: ${{ steps.ifBuildTrigger.outputs.HAS_NEW_COMMITS }}
RELEASE_TODAY: ${{ steps.ifBuildTrigger.outputs.RELEASE_TODAY }}
steps:
- name: Clone this repo to machine
run: |
git clone -b master https://github.com/${{ github.repository }}
cd Radiance
git branch -a
git checkout cvsimport
ls
- name: Install cvsimport
run: |
sudo apt-get update
sudo add-apt-repository ppa:git-core/ppa
sudo apt install git
sudo apt install git-cvs
apt show git-cvs
- name: Run CVS Import
run: |
cd Radiance
bash cvsimport.sh
- name: Set up build trigger
id: ifBuildTrigger
run: |
cd Radiance
git checkout master
HAS_NEW_COMMITS=false
if [[ "$(git status)" == *"Your branch is ahead of"* ]]; then HAS_NEW_COMMITS=true ; fi
echo set-output name=HAS_NEW_COMMITS::${HAS_NEW_COMMITS}
echo ::set-output name=HAS_NEW_COMMITS::${HAS_NEW_COMMITS}
HAS_NEW_COMMITS_FROM_TAG=false
LAST_COMMIT_ID=$(git log --pretty="%h" -n 1)
LAST_TAG=$(git describe --tags --abbrev=0)
echo LAST_COMMIT_ID = $LAST_COMMIT_ID
echo LAST_TAG = $LAST_TAG
if [[ "$LAST_COMMIT_ID" != "$LAST_TAG" ]]; then echo "Has new commits since last release"; HAS_NEW_COMMITS_FROM_TAG=true; fi
LAST_RELEASE_SEVEN_DAYS_OLD=false
LATEST_DATE=$(git show -s --format=%ai refs/tags/$LAST_TAG)
echo $LATEST_DATE
if [[ $(($(date '+%s') - $(date -d "$LATEST_DATE" '+%s'))) -gt 7*86400 ]]; then echo "Last release was 7 days ago"; LAST_RELEASE_SEVEN_DAYS_OLD=true; fi
TODAY_IS_SUNDAY=false
if [[ $(date +%u) -gt 6 ]]; then echo "Today is Sunday"; TODAY_IS_SUNDAY=true; fi
RELEASE_TODAY=false
if [[ "$TODAY_IS_SUNDAY" == "true" || "$LAST_RELEASE_SEVEN_DAYS_OLD" == "true" ]]; then echo "Last release was 7 days ago or today is sunday"; RELEASE_TODAY=true; fi
echo ::set-output name=RELEASE_TODAY::${RELEASE_TODAY}
if [[ "$HAS_NEW_COMMITS_FROM_TAG" == "false" ]]; then echo "No new commit from last release, cancel the release"; RELEASE_TODAY=false; fi
if [[ "$RELEASE_TODAY" == "true" ]]; then echo "release today"; fi
echo ::set-output name=RELEASE_TODAY::${RELEASE_TODAY}
if [[ "$HAS_NEW_COMMITS" == "false" && "$RELEASE_TODAY" == "true" ]];
then
echo ::set-output name=HAS_NEW_COMMITS::${RELEASE_TODAY}
echo "No commit, but release a new version today!";
fi
- name: Push updates to master branch
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
cd Radiance
remote_repo="https://${GITHUB_ACTOR}:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git push "${remote_repo}" HEAD:master;
build_Windows:
name: "Build for Windows"
runs-on: windows-latest
timeout-minutes: 20
needs: cvs_import
if: needs.cvs_import.outputs.HAS_NEW_COMMITS == 'true'
steps:
- uses: actions/checkout@v2
- name: install perl
run: |
# run in powershell
choco uninstall strawberryperl
choco install strawberryperl --version 5.30.3.1 --force
perl -version
ls c:\strawberry\c\lib
- name: install perl pp
run: |
unzip PAR.zip
python merge.py c:\\strawberry\\perl
ls c:\strawberry\perl\site\bin
pp --version
- name: override update version
run: |
git fetch
git checkout cvsimport
cp checkVersion.py ../checkVersion.py
git checkout master
cp ../checkVersion.py checkVersion.py
python checkVersion.py
shell: bash
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '5.15.2'
# mirror: 'http://mirrors.ocf.berkeley.edu/qt/'
- name: Install CMake
uses: ilammy/msvc-dev-cmd@v1
- name: Compile
uses: lukka/run-cmake@v2
with:
cmakeGenerator: VS16Win64
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: ${{ github.workspace }}/CMakeLists.txt
cmakeBuildType: Release
cmakeAppendedArgs: '-DBUILD_LIBTIFF=ON -DBUILD_PABOPTO_UTILS=ON -DBUILD_QT=ON'
buildWithCMakeArgs: "--config Release --target ALL_BUILD"
buildDirectory: ${{ github.workspace }}/build
buildWithCMake: true
- name: list
run: |
echo "List src\util============================="
ls src\util
echo "List src\px============================="
ls src\px
- name: set up QT path
run: |
setx path "%path%;D:\a\Radiance\Qt\5.12.8\msvc2017_64\bin"
setx path “%path%;D:\a\Radiance\Qt\5.12.8\msvc2017_64\lib”
- name: Build installer
uses: lukka/run-cmake@v2
with:
cmakeGenerator: VS16Win64
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: ${{ github.workspace }}/CMakeLists.txt
cmakeBuildType: Release
buildWithCMakeArgs: "--config Release --target PACKAGE"
buildDirectory: ${{ github.workspace }}/build
buildWithCMake: true
- name: Zip Compiled Artifact
run: |
mv build\_CPack_Packages\win64\NSIS\radiance-*-Windows\ radiance
Compress-Archive -U -Path radiance\* -DestinationPath Radiance_Windows
- name: list files
run: |
mkdir WindowsBuild
cp ./build/radiance-*.exe ./WindowsBuild/Radiance_Windows.exe
cp ./Radiance_Windows.zip ./WindowsBuild/Radiance_Windows.zip
ls -R
shell: bash
- name: Zip Build Artifact
run: |
Compress-Archive -U -Path WindowsBuild -DestinationPath Radiance_Windows_both
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: Radiance_Windows_both
path: Radiance_Windows_both.zip
build_OSX:
name: "Build for OSX"
runs-on: macos-13
timeout-minutes: 20
needs: cvs_import
if: needs.cvs_import.outputs.HAS_NEW_COMMITS == 'true'
steps:
- uses: actions/checkout@v2
with:
ref: master
- name: override update version
run: |
git fetch
git checkout cvsimport
cp checkVersion.py ../checkVersion.py
git checkout master
cp ../checkVersion.py checkVersion.py
python checkVersion.py
shell: bash
- name: Install XQuartz
run: |
wget https://github.com/XQuartz/XQuartz/releases/download/XQuartz-2.7.11/XQuartz-2.7.11.dmg
sudo hdiutil attach XQuartz-2.7.11.dmg
sudo installer -package /Volumes/XQuartz-2.7.11/XQuartz.pkg -target /
- name: Compile
env:
CMAKE_OSX_ARCHITECTURES: x86_64
run: |
mkdir build
cd build
cmake -DBUILD_PABOPTO_UTILS=ON -DCMAKE_BUILD_TYPE=Release ..
make -j8
- name: Run CPack
run: |
cd build
sudo cpack -G ZIP .
echo "=============================="
- name: Build pkg installer
run: |
cd ./build/_CPack_Packages/Darwin/ZIP/
sudo cp -r ./radiance*/usr/local/radiance .
ls
sudo pkgbuild --identifier radiance.pkg --root "radiance" --install-location "/usr/local/radiance" radiance_Darwin.pkg
sudo cp -r radiance_Darwin.pkg ../../../../Radiance_OSX.pkg
du -h -d=0 *
- name: Zip Build Artifact and list files
run: |
mkdir OSXBuild
sudo cp Radiance_OSX.pkg ./OSXBuild/Radiance_OSX.pkg
sudo mv ./build/_CPack_Packages/Darwin/ZIP/radiance-*-Darwin/usr/local/radiance ./radiance
sudo zip -r Radiance_OSX.zip ./radiance
sudo cp ./Radiance_OSX.zip ./OSXBuild/Radiance_OSX.zip
sudo zip -r Radiance_OSX_both.zip ./OSXBuild
ls -R
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: Radiance_OSX_both
path: Radiance_OSX_both.zip
build_OSX_arm64:
name: "Build for OSX arm64"
runs-on: macos-14
timeout-minutes: 20
needs: cvs_import
if: needs.cvs_import.outputs.HAS_NEW_COMMITS == 'true'
steps:
- uses: actions/checkout@v2
with:
ref: master
- name: override update version
run: |
git fetch
git checkout cvsimport
cp checkVersion.py ../checkVersion.py
git checkout master
cp ../checkVersion.py checkVersion.py
python3 checkVersion.py
shell: bash
- name: Install XQuartz
run: |
wget https://github.com/XQuartz/XQuartz/releases/download/XQuartz-2.8.5/XQuartz-2.8.5.pkg
sudo installer -package XQuartz-2.8.5.pkg -target /
- name: Compile
env:
CMAKE_OSX_ARCHITECTURES: x86_64
run: |
mkdir build
cd build
cmake -DCMAKE_OSX_ARCHITECTURES=arm64 -DBUILD_PABOPTO_UTILS=ON -DCMAKE_BUILD_TYPE=Release ..
make -j8
- name: Run CPack
run: |
cd build
sudo cpack -G ZIP .
echo "=============================="
- name: Build pkg installer
run: |
cd ./build/_CPack_Packages/Darwin/ZIP/
sudo cp -r ./radiance*/usr/local/radiance .
ls
sudo pkgbuild --identifier radiance.pkg --root "radiance" --install-location "/usr/local/radiance" radiance_Darwin.pkg
sudo cp -r radiance_Darwin.pkg ../../../../Radiance_OSX.pkg
du -h -d=0 *
- name: Zip Build Artifact and list files
run: |
mkdir OSXBuild
sudo cp Radiance_OSX.pkg ./OSXBuild/Radiance_OSX_arm64.pkg
sudo mv ./build/_CPack_Packages/Darwin/ZIP/radiance-*-Darwin/usr/local/radiance ./radiance
sudo zip -r Radiance_OSX.zip ./radiance
sudo cp ./Radiance_OSX.zip ./OSXBuild/Radiance_OSX_arm64.zip
sudo zip -r Radiance_OSX_arm64_both.zip ./OSXBuild
ls -R
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: Radiance_OSX_arm64_both
path: Radiance_OSX_arm64_both.zip
build_Linux:
name: "Build for Linux"
runs-on: ubuntu-20.04
timeout-minutes: 20
needs: cvs_import
if: needs.cvs_import.outputs.HAS_NEW_COMMITS == 'true'
steps:
- uses: actions/checkout@v2
with:
ref: master
- name: override update version
run: |
git fetch
git checkout cvsimport
cp checkVersion.py ../checkVersion.py
git checkout master
cp ../checkVersion.py checkVersion.py
python checkVersion.py
shell: bash
- name: Install CMake
uses: ilammy/msvc-dev-cmd@v1
- name: set dev packages
run: |
sudo apt install libglu1-mesa-dev freeglut3-dev
sudo sudo apt-get install csh
- name: Compile
run: |
mkdir build
cd build
cmake -DBUILD_PABOPTO_UTILS=ON -DCMAKE_BUILD_TYPE=Release ..
make -j8
- name: list files
run: |
cd ./build
ls -R
shell: bash
- name: Build installer
run: |
cd build
make package -j8
- name: Zip Build Artifact
run: |
cd ./build
zip -r Radiance_Linux.zip radiance-*-Linux.tar.gz
cp ./Radiance_Linux.zip ./../Radiance_Linux.zip
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: Radiance_Linux
path: Radiance_Linux.zip
Test_Windows_1:
needs: [build_Windows]
name: Test for Windows 1
runs-on: windows-latest
timeout-minutes: 40
defaults:
run:
shell: cmd
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: master
- name: Download Windows installers
uses: actions/download-artifact@v2
with:
name: Radiance_Windows_both
- name: unzip artifacts
run: |
unzip Radiance_Windows_both.zip
unzip WindowsBuild/Radiance_Windows.zip
- name: Display structure of downloaded files
run: ls -R
- name: run tests -util
shell: pwsh
run: |
$Env:RAYPATH = ".;${{ github.workspace }}\lib"
$Env:PATH += ";${{ github.workspace }}\bin"
rtrace -version
cd ./test/util/
make clean
make
- name: run tests -gen
shell: pwsh
run: |
$Env:RAYPATH = ".;${{ github.workspace }}\lib"
$Env:PATH += ";${{ github.workspace }}\bin"
rtrace -version
cd ./test/gen/
make clean
make
- name: run tests -cal
shell: pwsh
run: |
$Env:RAYPATH = ".;${{ github.workspace }}\lib"
$Env:PATH += ";${{ github.workspace }}\bin"
rtrace -version
cd ./test/cal/
make clean
make
- name: run tests -px
shell: cmd
run: |
set RAYPATH=.;${{ github.workspace }}\lib
set PATH=%PATH%;${{ github.workspace }}\bin
rtrace -version
cd ./test/px/
make clean
make
- name: run tests -cv
shell: cmd
run: |
set RAYPATH=.;${{ github.workspace }}\lib
set PATH=%PATH%;${{ github.workspace }}\bin
rtrace -version
cd ./test/cv/
make clean
make
- name: run tests -renders 1
shell: cmd
run: |
set RAYPATH=.;${{ github.workspace }}\lib
set PATH=%PATH%;${{ github.workspace }}\bin
rtrace -version
cd ./test/renders/
make clean
make batch1 -j2
- name: The job has failed
if: ${{ failure() }}
shell: pwsh
run: |
Compress-Archive -U -Path ./test/* -DestinationPath Radiance_Windows_Failed1
- name: Upload artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: Radiance_Windows_Failed1
path: Radiance_Windows_Failed1.zip
Test_Windows_2:
needs: [build_Windows]
name: Test for Windows 2
runs-on: windows-latest
timeout-minutes: 40
defaults:
run:
shell: cmd
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: master
- name: Download Windows installers
uses: actions/download-artifact@v2
with:
name: Radiance_Windows_both
- name: unzip artifacts
run: |
unzip Radiance_Windows_both.zip
unzip WindowsBuild/Radiance_Windows.zip
- name: Display structure of downloaded files
run: ls -R
- name: run tests -renders2
shell: cmd
run: |
set RAYPATH=.;${{ github.workspace }}\lib
set PATH=%PATH%;${{ github.workspace }}\bin
rtrace -version
cd ./test/renders/
make clean
make batch2 -j2
- name: The job has failed
if: ${{ failure() }}
shell: pwsh
run: |
Compress-Archive -U -Path ./test/* -DestinationPath Radiance_Windows_Failed2
- name: Upload artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: Radiance_Windows_Failed2
path: Radiance_Windows_Failed2.zip
Test_Windows_3:
needs: [build_Windows]
name: Test for Windows 3
runs-on: windows-latest
timeout-minutes: 40
defaults:
run:
shell: cmd
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: master
- name: Download Windows installers
uses: actions/download-artifact@v2
with:
name: Radiance_Windows_both
- name: unzip artifacts
run: |
unzip Radiance_Windows_both.zip
unzip WindowsBuild/Radiance_Windows.zip
- name: Display structure of downloaded files
run: ls -R
- name: run tests -renders 3
shell: cmd
run: |
set RAYPATH=.;${{ github.workspace }}\lib
set PATH=%PATH%;${{ github.workspace }}\bin
rtrace -version
cd ./test/renders/
make clean
make batch3 -j2
- name: The job has failed
if: ${{ failure() }}
shell: pwsh
run: |
Compress-Archive -U -Path ./test/* -DestinationPath Radiance_Windows_Failed3
- name: Upload artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: Radiance_Windows_Failed3
path: Radiance_Windows_Failed3.zip
Test_Windows_4:
needs: [build_Windows]
name: Test for Windows 4
runs-on: windows-latest
timeout-minutes: 40
defaults:
run:
shell: cmd
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: master
- name: Download Windows installers
uses: actions/download-artifact@v2
with:
name: Radiance_Windows_both
- name: unzip artifacts
run: |
unzip Radiance_Windows_both.zip
unzip WindowsBuild/Radiance_Windows.zip
- name: Display structure of downloaded files
run: ls -R
- name: run tests -renders 4
shell: cmd
run: |
set RAYPATH=.;${{ github.workspace }}\lib
set PATH=%PATH%;${{ github.workspace }}\bin
rtrace -version
cd ./test/renders/
make clean
make batch4 -j2
- name: The job has failed
if: ${{ failure() }}
shell: pwsh
run: |
Compress-Archive -U -Path ./test/* -DestinationPath Radiance_Windows_Failed4
- name: Upload artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: Radiance_Windows_Failed4
path: Radiance_Windows_Failed4.zip
Test_OSX_1:
needs: [build_OSX]
name: "Test for OSX 1"
runs-on: macos-13
timeout-minutes: 40
steps:
- name: get os version
run: |
uname -a
echo "=============================="
sw_vers -productVersion
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: master
- name: Download OSX installers
uses: actions/download-artifact@v2
with:
name: Radiance_OSX_both
- name: unzip artifacts
run: |
unzip Radiance_OSX_both.zip
unzip OSXBuild/Radiance_OSX.zip
- name: Display structure of downloaded files
run: ls -R
- name: run tests -util
run: |
export RAYPATH=.:${{ github.workspace }}/radiance/lib
export PATH=$PATH:${{ github.workspace }}/radiance/bin
rtrace -version
cd ./test/util/
make clean
make
- name: run tests -gen
run: |
export RAYPATH=.:${{ github.workspace }}/radiance/lib
export PATH=$PATH:${{ github.workspace }}/radiance/bin
rtrace -version
cd ./test/gen/
make clean
make
- name: run tests -cal
run: |
export RAYPATH=.:${{ github.workspace }}/radiance/lib
export PATH=$PATH:${{ github.workspace }}/radiance/bin
rtrace -version
cd ./test/cal/
make clean
make
- name: run tests -px
run: |
export RAYPATH=.:${{ github.workspace }}/radiance/lib
export PATH=$PATH:${{ github.workspace }}/radiance/bin
rtrace -version
cd ./test/px/
make clean
make
- name: run tests -cv
run: |
export RAYPATH=.:${{ github.workspace }}/radiance/lib
export PATH=$PATH:${{ github.workspace }}/radiance/bin
rtrace -version
cd ./test/cv/
make clean
make
- name: run tests -renders 1
run: |
export RAYPATH=.:${{ github.workspace }}/radiance/lib
export PATH=$PATH:${{ github.workspace }}/radiance/bin
rtrace -version
cd ./test/renders/
make clean
make batch1 -j3
- name: The job has failed
if: ${{ failure() }}
run: |
zip -r Radiance_Mac_Failed1.zip ./test/*
- name: Upload artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: Radiance_Mac_Failed1
path: Radiance_Mac_Failed1.zip
Test_OSX_2:
needs: [build_OSX]
name: "Test for OSX 2"
runs-on: macos-13
timeout-minutes: 40
steps:
- name: get os version
run: |
uname -a
echo "=============================="
sw_vers -productVersion
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: master
- name: Download OSX installers
uses: actions/download-artifact@v2
with:
name: Radiance_OSX_both
- name: unzip artifacts
run: |
unzip Radiance_OSX_both.zip
unzip OSXBuild/Radiance_OSX.zip
- name: Display structure of downloaded files
run: ls -R
- name: run tests -renders 2
run: |
export RAYPATH=.:${{ github.workspace }}/radiance/lib
export PATH=$PATH:${{ github.workspace }}/radiance/bin
rtrace -version
cd ./test/renders/
make clean
make batch2 -j3
- name: The job has failed
if: ${{ failure() }}
run: |
zip -r Radiance_Mac_Failed2.zip ./test/*
- name: Upload artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: Radiance_Mac_Failed2
path: Radiance_Mac_Failed2.zip
Test_OSX_3:
needs: [build_OSX]
name: "Test for OSX 3"
runs-on: macos-13
timeout-minutes: 40
steps:
- name: get os version
run: |
uname -a
echo "=============================="
sw_vers -productVersion
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: master
- name: Download OSX installers
uses: actions/download-artifact@v2
with:
name: Radiance_OSX_both
- name: unzip artifacts
run: |
unzip Radiance_OSX_both.zip
unzip OSXBuild/Radiance_OSX.zip
- name: Display structure of downloaded files
run: ls -R
- name: run tests -renders 3
run: |
export RAYPATH=.:${{ github.workspace }}/radiance/lib
export PATH=$PATH:${{ github.workspace }}/radiance/bin
rtrace -version
cd ./test/renders/
make clean
make batch3 -j3
- name: The job has failed
if: ${{ failure() }}
run: |
zip -r Radiance_Mac_Failed3.zip ./test/*
- name: Upload artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: Radiance_Mac_Failed3
path: Radiance_Mac_Failed3.zip
Test_OSX_4:
needs: [build_OSX]
name: "Test for OSX 4"
runs-on: macos-13
timeout-minutes: 40
steps:
- name: get os version
run: |
uname -a
echo "=============================="
sw_vers -productVersion
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: master
- name: Download OSX installers
uses: actions/download-artifact@v2
with:
name: Radiance_OSX_both
- name: unzip artifacts
run: |
unzip Radiance_OSX_both.zip
unzip OSXBuild/Radiance_OSX.zip
- name: Display structure of downloaded files
run: ls -R
- name: run tests -renders 4
run: |
export RAYPATH=.:${{ github.workspace }}/radiance/lib
export PATH=$PATH:${{ github.workspace }}/radiance/bin
rtrace -version
cd ./test/renders/
make clean
make batch4 -j3
- name: The job has failed
if: ${{ failure() }}
run: |
zip -r Radiance_Mac_Failed4.zip ./test/*
- name: Upload artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: Radiance_Mac_Failed4
path: Radiance_Mac_Failed4.zip
Test_Linux_1:
needs: [build_Linux]
name: "Test for Linux 1"
runs-on: ubuntu-20.04
timeout-minutes: 40
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: master
- name: Download Linux installers
uses: actions/download-artifact@v2
with:
name: Radiance_Linux
- name: unzip artifacts
run: |
unzip Radiance_Linux.zip
ls
echo "========== Extracting tar.gz ==========="
tar -xvf radiance-*-Linux.tar.gz
ls
echo "========== Extracting tar ==========="
- name: copy compiled folder
run: |
mkdir buildRad
sudo cp -avr ./radiance-*-Linux/usr/local/radiance ./buildRad
- name: Display structure of downloaded files
run: ls -R
- name: run tests -util
run: |
export RAYPATH=.:${{ github.workspace }}/buildRad/radiance/lib
export PATH=$PATH:${{ github.workspace }}/buildRad/radiance/bin
rtrace -version
cd ./test/util/
make clean
make
- name: run tests -gen
run: |
export RAYPATH=.:${{ github.workspace }}/buildRad/radiance/lib
export PATH=$PATH:${{ github.workspace }}/buildRad/radiance/bin
rtrace -version
cd ./test/gen/
make clean
make
- name: run tests -cal
run: |
export RAYPATH=.:${{ github.workspace }}/buildRad/radiance/lib
export PATH=$PATH:${{ github.workspace }}/buildRad/radiance/bin
rtrace -version
cd ./test/cal/
make clean
make -j2
- name: run tests -px
run: |
export RAYPATH=.:${{ github.workspace }}/buildRad/radiance/lib
export PATH=$PATH:${{ github.workspace }}/buildRad/radiance/bin
rtrace -version
cd ./test/px/
make clean
make
- name: run tests -cv
run: |
export RAYPATH=.:${{ github.workspace }}/buildRad/radiance/lib
export PATH=$PATH:${{ github.workspace }}/buildRad/radiance/bin
rtrace -version
cd ./test/cv/
make clean
make
- name: run tests -renders 1
run: |
export RAYPATH=.:${{ github.workspace }}/buildRad/radiance/lib
export PATH=$PATH:${{ github.workspace }}/buildRad/radiance/bin
rtrace -version
cd ./test/renders/
make clean
make batch1 -j2
- name: The job has failed
if: ${{ failure() }}
run: |
zip -r Radiance_Linux_Failed1.zip ./test/*
- name: Upload artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: Radiance_Linux_Failed1
path: Radiance_Linux_Failed1.zip
Test_Linux_2:
needs: [build_Linux]
name: "Test for Linux 2"
runs-on: ubuntu-20.04
timeout-minutes: 40
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: master
- name: Download Linux installers
uses: actions/download-artifact@v2
with:
name: Radiance_Linux
- name: unzip artifacts
run: |
unzip Radiance_Linux.zip
ls
echo "========== Extracting tar.gz ==========="
tar -xvf radiance-*-Linux.tar.gz
ls
echo "========== Extracting tar ==========="
- name: copy compiled folder
run: |
mkdir buildRad
sudo cp -avr ./radiance-*-Linux/usr/local/radiance ./buildRad
- name: Display structure of downloaded files
run: ls -R
- name: run tests -renders 2
run: |
export RAYPATH=.:${{ github.workspace }}/buildRad/radiance/lib
export PATH=$PATH:${{ github.workspace }}/buildRad/radiance/bin
rtrace -version
cd ./test/renders/
make clean
make batch2 -j2
- name: The job has failed
if: ${{ failure() }}
run: |
zip -r Radiance_Linux_Failed2.zip ./test/*
- name: Upload artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: Radiance_Linux_Failed2
path: Radiance_Linux_Failed2.zip
Test_Linux_3:
needs: [build_Linux]
name: "Test for Linux 3"
runs-on: ubuntu-20.04
timeout-minutes: 40
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: master
- name: Download Linux installers
uses: actions/download-artifact@v2
with:
name: Radiance_Linux
- name: unzip artifacts
run: |
unzip Radiance_Linux.zip
ls
echo "========== Extracting tar.gz ==========="
tar -xvf radiance-*-Linux.tar.gz
ls
echo "========== Extracting tar ==========="
- name: copy compiled folder
run: |
mkdir buildRad
sudo cp -avr ./radiance-*-Linux/usr/local/radiance ./buildRad
- name: Display structure of downloaded files
run: ls -R
- name: run tests -renders 3
run: |
export RAYPATH=.:${{ github.workspace }}/buildRad/radiance/lib
export PATH=$PATH:${{ github.workspace }}/buildRad/radiance/bin
rtrace -version
cd ./test/renders/
make clean
make batch3 -j2
- name: The job has failed
if: ${{ failure() }}
run: |
zip -r Radiance_Linux_Failed3.zip ./test/*
- name: Upload artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: Radiance_Linux_Failed3
path: Radiance_Linux_Failed3.zip
Test_Linux_4:
needs: [build_Linux]
name: "Test for Linux 4"
runs-on: ubuntu-20.04
timeout-minutes: 40
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: master
- name: Download Linux installers
uses: actions/download-artifact@v2
with:
name: Radiance_Linux
- name: unzip artifacts
run: |
unzip Radiance_Linux.zip
ls
echo "========== Extracting tar.gz ==========="
tar -xvf radiance-*-Linux.tar.gz
ls
echo "========== Extracting tar ==========="
- name: copy compiled folder
run: |
mkdir buildRad
sudo cp -avr ./radiance-*-Linux/usr/local/radiance ./buildRad
- name: Display structure of downloaded files
run: ls -R
- name: run tests -renders 4
run: |
export RAYPATH=.:${{ github.workspace }}/buildRad/radiance/lib
export PATH=$PATH:${{ github.workspace }}/buildRad/radiance/bin
rtrace -version
cd ./test/renders/
make clean
make batch4 -j2
- name: The job has failed
if: ${{ failure() }}
run: |
zip -r Radiance_Linux_Failed4.zip ./test/*
- name: Upload artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: Radiance_Linux_Failed4
path: Radiance_Linux_Failed4.zip
check_if_release:
needs: [cvs_import, Test_Windows_1,Test_Windows_2,Test_Windows_3,Test_Windows_4, Test_OSX_1, Test_OSX_2, Test_OSX_3, Test_OSX_4, Test_Linux_1, Test_Linux_2, Test_Linux_3, Test_Linux_4]
name: check if release
runs-on: ubuntu-20.04
env:
READY_TO_RELEASE: ${{ needs.cvs_import.outputs.RELEASE_TODAY }}
outputs:
RELEASE_TODAY: ${{ steps.if_release.outputs.RELEASE_TODAY }}
steps:
- name: Check date if release
id: if_release
run: |
echo ::set-output name=RELEASE_TODAY::${READY_TO_RELEASE}
zip_auxiliary:
name: zip auxiliary files
runs-on: ubuntu-20.04
needs: check_if_release
if: needs.check_if_release.outputs.RELEASE_TODAY == 'true'
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: auxiliary
- name: The job has failed
run: |
zip -r Radiance_Auxiliary.zip ./*
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: Radiance_Auxiliary
path: Radiance_Auxiliary.zip
release_installers:
name: deploy installers
runs-on: ubuntu-20.04
needs: zip_auxiliary
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: master
fetch-depth: 0
- name: Download all installers
uses: actions/download-artifact@v2
- name: unzip artifacts
run: |
unzip Radiance_Windows_both/Radiance_Windows_both.zip
unzip Radiance_OSX_both/Radiance_OSX_both.zip
unzip Radiance_OSX_arm64_both/Radiance_OSX_arm64_both.zip
- name: Get Git log
id: get_release_note
run: |
LAST_COMMIT_ID=$(git log --pretty="%h" -n 1)
RELEASE_TAG=${LAST_COMMIT_ID}
LAST_TAG=$(git describe --tags --abbrev=0)
echo "The last tag: $LAST_TAG"
echo "The release tag: $RELEASE_TAG"
note_header="[<h3>$RELEASE_TAG</h3>](https://github.com/${{ github.repository }}/compare/$LAST_TAG...$RELEASE_TAG) ($(date +'%Y-%m-%d'))"
RELEASE_NOTE="$note_header<ul>$(git log $LAST_TAG..HEAD --pretty="<li> %s -%an (%h)</li>" )</ul>"
echo $RELEASE_NOTE
echo ::set-output name=RELEASE_NOTE::${RELEASE_NOTE}
- name: get release name
id: get_release_name
run: |
LAST_COMMIT_ID=$(git log --pretty="%h" -n 1)
RAD_VERSION=$(cat src/rt/VERSION)
RAD_VERSION="${RAD_VERSION/RADIANCE /}"
RELEASE_TAG=${LAST_COMMIT_ID}
RELEASE_NAME='Radiance '"${RAD_VERSION}"' ('$(date +'%Y-%m-%d')')'
echo "Found Radiance version: [$RAD_VERSION]"
echo "Release tag: $RELEASE_TAG"
echo "Release name: $RELEASE_NAME"
echo ::set-output name=LAST_COMMIT_ID::${LAST_COMMIT_ID}
echo ::set-output name=RELEASE_TAG::${RELEASE_TAG}
echo ::set-output name=RELEASE_NAME::${RELEASE_NAME}
- name: check release name/note
run: |
echo "${{steps.get_release_name.outputs.RELEASE_TAG}}"
echo "${{steps.get_release_name.outputs.RELEASE_NAME}}"
echo "${{steps.get_release_note.outputs.RELEASE_NOTE}}"
- name: Create Release
id: create_release
uses: actions/create-release@v1.1.1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
tag_name: ${{steps.get_release_name.outputs.RELEASE_TAG}}
release_name: ${{steps.get_release_name.outputs.RELEASE_NAME}}
commitish: master
body: ${{steps.get_release_note.outputs.RELEASE_NOTE}}
draft: false
prerelease: true
- name: Release Asset Radiance_Windows exe
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: WindowsBuild/Radiance_Windows.exe
asset_name: Radiance_${{steps.get_release_name.outputs.RELEASE_TAG}}_Windows.exe
asset_content_type: application/exe
- name: Release Asset Radiance_Windows zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: WindowsBuild/Radiance_Windows.zip
asset_name: Radiance_${{steps.get_release_name.outputs.RELEASE_TAG}}_Windows.zip
asset_content_type: application/zip
- name: Release Asset Radiance_Linux
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Radiance_Linux/Radiance_Linux.zip
asset_name: Radiance_${{steps.get_release_name.outputs.RELEASE_TAG}}_Linux.zip
asset_content_type: application/zip
- name: Release Asset Radiance_OSX pkg
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: OSXBuild/Radiance_OSX.pkg
asset_name: Radiance_${{steps.get_release_name.outputs.RELEASE_TAG}}_OSX.pkg
asset_content_type: application/pkg
- name: Release Asset Radiance_OSX zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: OSXBuild/Radiance_OSX.zip
asset_name: Radiance_${{steps.get_release_name.outputs.RELEASE_TAG}}_OSX.zip
asset_content_type: application/zip
- name: Release Asset Radiance_OSX_arm64 pkg
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: OSXBuild/Radiance_OSX_arm64.pkg
asset_name: Radiance_${{steps.get_release_name.outputs.RELEASE_TAG}}_OSX_arm64.pkg
asset_content_type: application/pkg
- name: Release Asset Radiance_OSX_arm64 zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: OSXBuild/Radiance_OSX_arm64.zip
asset_name: Radiance_${{steps.get_release_name.outputs.RELEASE_TAG}}_OSX_arm64.zip
asset_content_type: application/zip
- name: Release Asset Radiance_Auxiliary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Radiance_Auxiliary/Radiance_Auxiliary.zip
asset_name: Radiance_Auxiliary_${{steps.get_release_name.outputs.RELEASE_TAG}}.zip
asset_content_type: application/zip