Improved error checking point coordinates #5
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 and deploy | |
on: [push] | |
env: | |
source-directory: $GITHUB_WORKSPACE | |
build-directory: /tmp/build | |
ftp_server: ${{ secrets.FTP_SERVER }} | |
ftp_port: ${{ secrets.FTP_PORT }} | |
ftp_username: ${{ secrets.FTP_USERNAME }} | |
ftp_password: ${{ secrets.FTP_PASSWORD }} | |
remote_dir1: ${{ secrets.FTP_REMOTE_DIR1 }} | |
remote_dir2: ${{ secrets.FTP_REMOTE_DIR2 }} | |
remote_dir3: ${{ secrets.FTP_REMOTE_DIR3 }} | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
name: "Build and deploy" | |
timeout-minutes: 8 | |
steps: | |
- name: Checkout Campo | |
uses: actions/checkout@v3 | |
- name: configure system | |
run: | | |
# sudo apt-get update | |
# sudo apt-get upgrade | |
# sudo apt-get autoremove | |
sudo apt-get --yes install lftp | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: campo | |
environment-file: environment/configuration/conda_environment.yaml | |
python-version: 3.11 | |
auto-activate-base: false | |
- name: Build | |
shell: bash -l {0} | |
run: | | |
mkdir ${{ env.build-directory }} | |
cd ${{ env.build-directory }} | |
cmake ${{ env.source-directory }} -DCAMPO_BUILD_WHEEL=ON | |
make documentation | |
make install | |
rm -f package/dist/*gz | |
- name: Deploy wheel | |
run: | | |
mkdir -p $HOME/.ssh | |
echo "HostKeyAlgorithms ssh-rsa" >> $HOME/.ssh/config | |
echo "PubkeyAcceptedKeyTypes ssh-rsa" >> $HOME/.ssh/config | |
echo "StrictHostKeyChecking no" >> $HOME/.ssh/config | |
cd ${{ env.build-directory }} | |
lftp -c "open --user ${{ env.ftp_username }} --password ${{ env.ftp_password }} -p ${{ env.ftp_port }} ${{ env.ftp_server }};set sftp:auto-confirm yes;set ssl:verify-certificate false;mirror --verbose --reverse --continue package/dist/ ${{ env.remote_dir2 }}" | |
- name: Deploy documentation | |
if: github.ref == 'refs/heads/master' | |
run: | | |
cd ${{ env.build-directory }} | |
# lftp -c "open --user ${{ env.ftp_username }} --password ${{ env.ftp_password }} -p ${{ env.ftp_port }} ${{ env.ftp_server }};set sftp:auto-confirm yes;set ssl:verify-certificate false;mirror --verbose --reverse --continue --parallel=2 documentation/_build/ ${{ env.remote_dir1 }}" | |
- name: Deploy development documentation | |
run: | | |
cd ${{ env.build-directory }} | |
lftp -c "open --user ${{ env.ftp_username }} --password ${{ env.ftp_password }} -p ${{ env.ftp_port }} ${{ env.ftp_server }};set sftp:auto-confirm yes;set ssl:verify-certificate false;mirror --verbose --reverse --continue --parallel=2 documentation/_build/ ${{ env.remote_dir3 }}" |