From 7bb1edf8690641b439f10612f4c684d8413d7fc8 Mon Sep 17 00:00:00 2001 From: Dmitry Shulyak Date: Thu, 5 Sep 2024 14:43:26 +0200 Subject: [PATCH] upload archive only with stacks binary when tag is created --- .github/workflows/build.yml | 7 +------ .github/workflows/release.yml | 38 ++++++++++++++--------------------- Cargo.toml | 5 ++++- 3 files changed, 20 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9178411..3891099 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ on: jobs: build: name: Build - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest strategy: matrix: target: [ @@ -25,12 +25,7 @@ jobs: with: target: ${{ matrix.target }} - run: CLANG=clang-15 cargo install --path=stacks --root=. --target ${{ matrix.target }} - - run: cargo install --path=stacksexport --root=. --target ${{ matrix.target }} - uses: actions/upload-artifact@v4 with: name: stacks-${{ matrix.target }} path: bin/stacks - - uses: actions/upload-artifact@v4 - with: - name: stacksexport-${{ matrix.target }} - path: bin/stacksexport diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47f2785..46b8599 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,14 +17,14 @@ jobs: uses: ./.github/workflows/build.yml secrets: inherit release: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest needs: [build, test] steps: - - name: Download the artifacts + name: download artifacts uses: actions/download-artifact@v4 - - name: Create Release + name: create Release uses: actions/create-release@v1 id: create_release env: @@ -34,24 +34,16 @@ jobs: release_name: Release ${{ github.ref_name }} draft: false prerelease: true - - - name: upload stacks x86_64 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: stacks-x86_64-unknown-linux-gnu/stacks - asset_name: stacks-x86_64-unknown-linux-gnu - asset_content_type: application/octet-stream - - - name: upload stacksexport x86_64 - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: stacks-x86_64-unknown-linux-gnu/stacksexport - asset_name: stacks-x86_64-unknown-linux-gnu - asset_content_type: application/octet-stream + - name: archive binary + run: tar -czvf stacks-x86_64-unknown-linux-gnu.tar.gz stacks-x86_64-unknown-linux-gnu/stacks + + - name: upload stacks binary + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./stacks-x86_64-unknown-linux-gnu.tar.gz + asset_name: stacks-x86_64-unknown-linux-gnu.tar.gz + asset_content_type: application/gzip \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 556b705..9a19d5b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,5 +4,8 @@ members = ["e2e", "stacks", "stacksexport", "tracing-stacks"] [profile.release] opt-level = 3 lto = true -codegen-units = 1 +codegen-units = 16 + +[profile.release-debug] +inherits = "release" debug = 1