Skip to content

Commit 47ffac1

Browse files
committed
fix
1 parent f0ebf76 commit 47ffac1

File tree

1 file changed

+1
-92
lines changed

1 file changed

+1
-92
lines changed

.github/workflows/release_test.yml

Lines changed: 1 addition & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -31,89 +31,9 @@ jobs:
3131
id: set_version
3232
run: echo "version=$(git cliff --bumped-version)" >> "$GITHUB_OUTPUT"
3333

34-
build_and_test:
35-
name: Build & Test for ${{ matrix.config.target }}
36-
needs: extract_version
37-
strategy:
38-
matrix:
39-
config:
40-
- { os: ubuntu-22.04, target: x86_64-unknown-linux-gnu }
41-
- { os: ubuntu-22.04, target: aarch64-unknown-linux-gnu }
42-
- { os: macos-14, target: x86_64-apple-darwin }
43-
- { os: macos-14, target: aarch64-apple-darwin }
44-
- { os: windows-2022, target: x86_64-pc-windows-msvc }
45-
- { os: windows-2022, target: aarch64-pc-windows-msvc }
46-
47-
runs-on: ${{ matrix.config.os }}
48-
49-
outputs:
50-
artifact_url: ${{ steps.upload-artifacts.outputs.artifact-url }}
51-
52-
steps:
53-
- uses: actions/checkout@v4
54-
with:
55-
submodules: true
56-
- uses: actions-rust-lang/setup-rust-toolchain@v1
57-
with:
58-
target: ${{ matrix.config.target }}
59-
60-
- uses: Swatinem/rust-cache@v2
61-
id: rust-cache
62-
63-
# The Aarch64 Linux is a special snowflake, we need to install its toolchain
64-
- name: Install arm64 toolchain
65-
if: matrix.config.target == 'aarch64-unknown-linux-gnu'
66-
run: |
67-
sudo apt-get update
68-
sudo apt-get install -y gcc-aarch64-linux-gnu
69-
70-
# running containers via `services` only works on linux
71-
# https://github.com/actions/runner/issues/1866
72-
- name: 🐘 Setup postgres
73-
uses: ikalnytskyi/action-setup-postgres@v7
74-
75-
- name: 🧪 Run Tests
76-
run: cargo test --release
77-
env:
78-
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
79-
80-
- name: 🛠️ Run Build
81-
run: cargo build -p pgt_cli --release --target ${{ matrix.config.target }}
82-
env:
83-
# Strip all debug symbols from the resulting binaries
84-
RUSTFLAGS: "-C strip=symbols -C codegen-units=1"
85-
# Inline the version in the CLI binary
86-
PGT_VERSION: ${{ needs.extract_version.outputs.version }}
87-
88-
# windows is a special snowflake too, it saves binaries as .exe
89-
- name: 👦 Name the Binary
90-
if: matrix.config.os == 'windows-2022'
91-
run: |
92-
mkdir dist
93-
cp target/${{ matrix.config.target }}/release/postgrestools.exe ./dist/postgrestools_${{ matrix.config.target }}
94-
- name: 👦 Name the Binary
95-
if: matrix.config.os != 'windows-2022'
96-
run: |
97-
mkdir dist
98-
cp target/${{ matrix.config.target }}/release/postgrestools ./dist/postgrestools_${{ matrix.config.target }}
99-
100-
# It is not possible to return the artifacts from the matrix jobs individually: Matrix outputs overwrite each other.
101-
# A common workaround is to upload and download the resulting artifacts.
102-
- name: 👆 Upload Artifacts
103-
id: upload-artifacts
104-
uses: actions/upload-artifact@v4
105-
with:
106-
name: postgrestools_${{ matrix.config.target }}
107-
path: ./dist/postgrestools_*
108-
# The default compression level is 6; this took the binary down from 350 to 330MB.
109-
# It is recommended to use a lower level for binaries, since the compressed result is not much smaller,
110-
# and the higher levels of compression take much longer.
111-
compression-level: 2
112-
if-no-files-found: error
113-
11434
create_changelog_and_release:
11535
runs-on: ubuntu-latest
116-
needs: [extract_version, build_and_test] # make sure that tests & build work correctly
36+
needs: [extract_version] # make sure that tests & build work correctly
11737
steps:
11838
- name: Checkout Repo
11939
uses: actions/checkout@v4
@@ -130,17 +50,6 @@ jobs:
13050
env:
13151
GITHUB_REPO: ${{ github.repository }}
13252

133-
- name: Ensure tag matches
134-
if: steps.create_changelog.outputs.version != needs.extract_version.outputs.version
135-
run: exit 1
136-
137-
- name: 👇 Download Artifacts
138-
uses: actions/download-artifact@v4
139-
id: download
140-
with:
141-
merge-multiple: true
142-
pattern: postgrestools_*
143-
14453
- name: 📂 Create Release
14554
uses: softprops/action-gh-release@v2
14655
id: create-release

0 commit comments

Comments
 (0)