Skip to content

Commit

Permalink
done step
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed Sep 26, 2023
1 parent 5bedd60 commit de60a23
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ defaults:

jobs:
build:
# Don't change this name - it is used by the merge protection rules
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -69,20 +68,20 @@ jobs:
run: |
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
vcpkg install openssl:x64-windows-static-md
- name: Run build (native)
- name: Build (native)
if: matrix.cross != 'true'
run: |
cargo build --release --target ${{ matrix.target }} --features=ssl --package martin
cargo build --release --target ${{ matrix.target }} --features=cli --package martin-mbtiles
- name: Run build (aarch64-apple-darwin)
- name: Build (cross - aarch64-apple-darwin)
if: matrix.target == 'aarch64-apple-darwin'
run: |
rustup target add "${{ matrix.target }}"
# compile without debug symbols because stripping them with `strip` does not work cross-platform
export RUSTFLAGS='-C link-arg=-s'
cargo build --release --target ${{ matrix.target }} --features=vendored-openssl --package martin
cargo build --release --target ${{ matrix.target }} --no-default-features --features=rustls,cli --package martin-mbtiles
- name: Run build (aarch64-unknown-linux-gnu)
- name: Build (cross - aarch64-unknown-linux-gnu)
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
Expand All @@ -91,7 +90,7 @@ jobs:
export RUSTFLAGS='-C link-arg=-s -C linker=aarch64-linux-gnu-gcc'
cargo build --release --target ${{ matrix.target }} --features=vendored-openssl --package martin
cargo build --release --target ${{ matrix.target }} --no-default-features --features=rustls,cli --package martin-mbtiles
- name: Save build artifacts
- name: Move build artifacts
run: |
mkdir -p target_releases
mv target/${{ matrix.target }}/release/martin${{ matrix.ext }} target_releases
Expand All @@ -103,14 +102,13 @@ jobs:
cargo install cargo-deb
cargo deb -v -p martin --output target/debian/martin.deb
mv target/debian/martin.deb target_releases
- name: Save build artifact build-${{ matrix.target }}
- name: Save build artifacts to build-${{ matrix.target }}
uses: actions/upload-artifact@v3
with:
name: build-${{ matrix.target }}
path: target_releases/*

test:
# Don't change this name - it is used by the merge protection rules
name: Test ${{ matrix.target }}
runs-on: ${{ matrix.os }}
needs: [ build ]
Expand Down Expand Up @@ -195,7 +193,6 @@ jobs:
retention-days: 5

test-legacy:
# Don't change this name - it is used by the merge protection rules
name: Test Legacy DB
runs-on: ubuntu-latest
needs: [ build ]
Expand Down Expand Up @@ -289,7 +286,6 @@ jobs:
DATABASE_URL: postgres://${{ env.PGUSER }}:${{ env.PGUSER }}@${{ env.PGHOST }}:${{ job.services.postgres.ports[5432] }}/${{ env.PGDATABASE }}?sslmode=${{ matrix.sslmode }}

package:
# Don't change this name - it is used by the merge protection rules
name: Package ${{ matrix.target }}
runs-on: ${{ matrix.os }}
needs: [ test, test-legacy ]
Expand Down Expand Up @@ -357,3 +353,13 @@ jobs:
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# This final step is needed to mark the whole workflow as successful
# Don't change its name - it is used by the merge protection rules
done:
name: CI Finished
runs-on: ubuntu-latest
needs: [ package ]
steps:
- name: Finished
run: echo "CI finished successfully"

0 comments on commit de60a23

Please sign in to comment.