CI : Fix individual actions #41
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, Run, Upload (Parallel) | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push events but only for the $default-branch branch | |
push: | |
branches: [ 'master' ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
generate-paths: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Generate paths | |
working-directory: ./topo_geo_paths | |
run: cargo run -r | |
# Save generated trajectories | |
- name: Upload trajectory0.txt | |
uses: actions/upload-artifact@v4 | |
with: | |
name: trajectory0.txt | |
path: topo_geo_paths/trajectory0.txt | |
- name: Upload trajectory1 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: trajectory1 | |
path: trajectory1.txt | |
- name: Upload trajectory2 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: trajectory2 | |
path: trajectory2.txt | |
optimize-path0: | |
runs-on: ubuntu-latest | |
needs: generate-paths | |
steps: | |
- uses: actions/checkout@v4 # Make sure to checkout so custom actions can be found | |
- name: Optimize Path 0 | |
uses: ./.github/actions/optimize_path | |
with: | |
path_index: 0 | |
optimize-path1: | |
runs-on: ubuntu-latest | |
needs: generate-paths | |
steps: | |
- uses: actions/checkout@v4 # Make sure to checkout so custom actions can be found | |
- name: Optimize Path 1 | |
uses: ./.github/actions/optimize_path | |
with: | |
path_index: 1 | |
optimize-path2: | |
runs-on: ubuntu-latest | |
needs: generate-paths | |
steps: | |
- uses: actions/checkout@v4 # Make sure to checkout so custom actions can be found | |
- name: Optimize Path 2 | |
uses: ./.github/actions/optimize_path | |
with: | |
path_index: 2 | |
visualize-path0: | |
runs-on: ubuntu-latest | |
needs: optimize-path0 | |
steps: | |
- uses: actions/checkout@v4 # Make sure to checkout so custom actions can be found | |
- name: Visualize Path 0 | |
uses: ./.github/actions/visualize_path | |
with: | |
path_index: 0 | |
visualize-path1: | |
runs-on: ubuntu-latest | |
needs: optimize-path1 | |
steps: | |
- uses: actions/checkout@v4 # Make sure to checkout so custom actions can be found | |
- name: Visualize Path 1 | |
uses: ./.github/actions/visualize_path | |
with: | |
path_index: 1 | |
visualize-path2: | |
runs-on: ubuntu-latest | |
needs: optimize-path2 | |
steps: | |
- uses: actions/checkout@v4 # Make sure to checkout so custom actions can be found | |
- name: Visualize Path 2 | |
uses: ./.github/actions/visualize_path | |
with: | |
path_index: 2 | |
upload_pages: | |
needs: [visualize-path0, visualize-path1, visualize-path2] | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download trajectory0_opt.html | |
uses: actions/download-artifact@v4 | |
with: | |
name: trajectory0_opt.html | |
path: pages | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: pages | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |