diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index 7d41db2..c7855f6 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -6,10 +6,10 @@ on: - master inputs: version: - description: 'Version number' + description: "Version number" required: true body: - description: 'Description of the release' + description: "Description of the release" required: true env: @@ -23,24 +23,24 @@ jobs: fail-fast: true steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - uses: Swatinem/rust-cache@v1 - - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --verbose -p dijkstra_map_gd - - name: Strip library file - run: strip target/release/libdijkstra_map_gd.so - - uses: actions/upload-artifact@v2 - with: - name: libdijkstra_map_gd.so - path: target/release/libdijkstra_map_gd.so - - # This jobs running on ubuntu-latest may be surprising : it's because I - # couldn't make the build succeed on windows, but using the + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - uses: Swatinem/rust-cache@v2 + - uses: actions-rs/cargo@v1 + with: + command: build + args: --release --verbose -p dijkstra_map_gd + - name: Strip library file + run: strip target/release/libdijkstra_map_gd.so + - uses: actions/upload-artifact@v3 + with: + name: libdijkstra_map_gd.so + path: target/release/libdijkstra_map_gd.so + + # This jobs running on ubuntu-latest may be surprising : it's because I + # couldn't make the build succeed on windows, but using the # x86_64-pc-windows-gnu on linux works perfectly well. build-windows: runs-on: ubuntu-latest @@ -49,24 +49,24 @@ jobs: fail-fast: true steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: x86_64-pc-windows-gnu - - uses: Swatinem/rust-cache@v1 - # we need a windows linker - - name: Install gcc-mingw-w64-x86-64 linker - run: sudo apt install gcc-mingw-w64-x86-64 - - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --verbose -p dijkstra_map_gd --target x86_64-pc-windows-gnu - - uses: actions/upload-artifact@v2 - with: - name: dijkstra_map_gd.dll - path: target/x86_64-pc-windows-gnu/release/dijkstra_map_gd.dll - + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: x86_64-pc-windows-gnu + - uses: Swatinem/rust-cache@v2 + # we need a windows linker + - name: Install gcc-mingw-w64-x86-64 linker + run: sudo apt install gcc-mingw-w64-x86-64 + - uses: actions-rs/cargo@v1 + with: + command: build + args: --release --verbose -p dijkstra_map_gd --target x86_64-pc-windows-gnu + - uses: actions/upload-artifact@v3 + with: + name: dijkstra_map_gd.dll + path: target/x86_64-pc-windows-gnu/release/dijkstra_map_gd.dll + build-macos: runs-on: macos-latest @@ -74,48 +74,48 @@ jobs: fail-fast: true steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: x86_64-apple-darwin - default: true - override: true - - uses: Swatinem/rust-cache@v1 - - uses: actions-rs/cargo@v1 - with: - command: build - args: --release -p dijkstra_map_gd - - uses: actions/upload-artifact@v2 - with: - name: libdijkstra_map_gd.dylib - path: target/release/libdijkstra_map_gd.dylib + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: x86_64-apple-darwin + default: true + override: true + - uses: Swatinem/rust-cache@v2 + - uses: actions-rs/cargo@v1 + with: + command: build + args: --release -p dijkstra_map_gd + - uses: actions/upload-artifact@v3 + with: + name: libdijkstra_map_gd.dylib + path: target/release/libdijkstra_map_gd.dylib commit: runs-on: ubuntu-latest needs: [build-linux, build-windows, build-macos] - + steps: - - uses: actions/checkout@v2 - - name: Download libdijkstra_map_gd.so - uses: actions/download-artifact@v2 - with: - name: libdijkstra_map_gd.so - path: addons/dijkstra_map/Dijkstra_map_library/bin/linux/ - - name: Download dijkstra_map_gd.dll - uses: actions/download-artifact@v2 - with: - name: dijkstra_map_gd.dll - path: addons/dijkstra_map/Dijkstra_map_library/bin/windows/ - - name: Download libdijkstra_map_gd.dylib - uses: actions/download-artifact@v2 - with: - name: libdijkstra_map_gd.dylib - path: addons/dijkstra_map/Dijkstra_map_library/bin/macos/ - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "Release ${{ github.event.inputs.version }}\n${{ github.event.inputs.body }}" - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - tagging_message: "${{ github.event.inputs.version }}\n${{ github.event.inputs.body }}" \ No newline at end of file + - uses: actions/checkout@v3 + - name: Download libdijkstra_map_gd.so + uses: actions/download-artifact@v3 + with: + name: libdijkstra_map_gd.so + path: addons/dijkstra_map/Dijkstra_map_library/bin/linux/ + - name: Download dijkstra_map_gd.dll + uses: actions/download-artifact@v3 + with: + name: dijkstra_map_gd.dll + path: addons/dijkstra_map/Dijkstra_map_library/bin/windows/ + - name: Download libdijkstra_map_gd.dylib + uses: actions/download-artifact@v3 + with: + name: libdijkstra_map_gd.dylib + path: addons/dijkstra_map/Dijkstra_map_library/bin/macos/ + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "Release ${{ github.event.inputs.version }}\n${{ github.event.inputs.body }}" + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + tagging_message: "${{ github.event.inputs.version }}\n${{ github.event.inputs.body }}" diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 78d5cac..7d06b6b 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -27,15 +27,15 @@ jobs: target: x86_64-apple-darwin steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: ${{ matrix.target }} - default: true - override: true - - uses: Swatinem/rust-cache@v1 - - uses: actions-rs/cargo@v1 - with: - command: test - args: --verbose --workspace + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: ${{ matrix.target }} + default: true + override: true + - uses: Swatinem/rust-cache@v2 + - uses: actions-rs/cargo@v1 + with: + command: test + args: --verbose --workspace