Rename project to 'redstart' #150
This file contains hidden or 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 & Test | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| env: | |
| BUILD_TYPE: Release | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Install readline | |
| run: sudo apt install libreadline-dev -y | |
| - name: Configure CMake | |
| run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
| - name: Build | |
| run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
| - name: Test | |
| working-directory: ${{github.workspace}} | |
| run: ./build/tests/tests --gtest_print_time | |
| - name: Run Lisp Scripts | |
| run: | | |
| for file in ${{ github.workspace }}/tests/programs/*.lsp; do | |
| echo "Executing $file" | |
| time ${{ github.workspace }}/build/src/rst $file | |
| done | |
| - name: Bundle Release | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| run: | | |
| mkdir -p ${{ github.workspace }}/release | |
| cp -v ${{ github.workspace }}/build/src/rst ${{ github.workspace }}/release/ | |
| cp -v -r ${{ github.workspace }}/src/stdlib ${{ github.workspace }}/release/ | |
| tar -czvf redstart-linux-amd64.tar.gz -C ${{ github.workspace }}/release rst stdlib | |
| pwd | |
| ls -la | |
| - name: Publish Relase | |
| uses: appleboy/scp-action@master | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| with: | |
| username: ${{ secrets.USER }} | |
| host: ${{ secrets.HOST }} | |
| port: ${{ secrets.PORT }} | |
| key: ${{ secrets.KEY }} | |
| source: "redstart-linux-amd64.tar.gz" | |
| target: "/var/www/files/redstart/release/latest" |