-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP]Add release.yml workflow. #282
Open
wa5i
wants to merge
1
commit into
Tongsuo-Project:8.3-stable
Choose a base branch
from
wa5i:8.3-feature
base: 8.3-stable
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# Copyright 2022 The Tongsuo Project Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License 2.0 (the "License"). You may not use | ||
# this file except in compliance with the License. You can obtain a copy | ||
# in the file LICENSE in the source distribution or at | ||
# https://github.com/Tongsuo-Project/Tongsuo/blob/master/LICENSE.txt | ||
|
||
name: Tongsuo Release | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
branches: | ||
- 8.3-stable | ||
|
||
jobs: | ||
build-linux: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- os: ubuntu-latest | ||
arch: x86-64-linux-gnu | ||
libs: libc6-dev-amd64-cross | ||
cc_prefix: x86_64-linux-gnu- | ||
rpath: '/opt/tongsuo/lib64:./opt/tongsuo/lib64:./tongsuo/lib64' | ||
target: linux-x86_64 | ||
- os: ubuntu-latest | ||
arch: aarch64-linux-gnu | ||
libs: libc6-dev-arm64-cross | ||
cc_prefix: aarch64-linux-gnu- | ||
rpath: '/opt/tongsuo/lib64:./opt/tongsuo/lib64:./tongsuo/lib64' | ||
target: linux-aarch64 | ||
- os: macos-10.15 | ||
rpath: '/opt/tongsuo/lib64:./opt/tongsuo/lib64:./tongsuo/lib64' | ||
target: darwin64-x86_64-cc | ||
runs-on: ${{ matrix.platform.os }} | ||
steps: | ||
- name: install packages | ||
if: ${{ matrix.platform.os == 'ubuntu-latest' }} | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -yq --force-yes install \ | ||
gcc-${{ matrix.platform.arch }} \ | ||
${{ matrix.platform.libs }} | ||
- uses: actions/checkout@v2 | ||
- name: config | ||
run: ./Configure --prefix=/opt/tongsuo --cross-compile-prefix=${{ matrix.platform.cc_prefix }} ${{ matrix.platform.target }} -Wl,-rpath,${{ matrix.platform.rpath }} enable-ssl-trace enable-crypto-mdebug enable-crypto-mdebug-backtrace enable-egd enable-ntls enable-optimize-chacha enable-status enable-cert-compression enable-delegated-credential enable-ec_elgamal enable-sm2 enable-sm3 enable-sm4 enable-dynamic-ciphers enable-session-lookup enable-session-reused-type enable-rsa-multi-prime-key-compat enable-skip-scsv enable-verify-sni enable-evp-cipher-api-compat enable-dycert-ocsp && perl configdata.pm --dump | ||
- name: make | ||
run: make -j | ||
- name: make install | ||
run: sudo make install | ||
- name: pack | ||
run: tar zcvf ./tongsuo-${{ matrix.platform.target }}.tar.gz /opt/tongsuo | ||
- name: upload | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
tongsuo-${{ matrix.platform.target }}.tar.gz | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: debug with ssh tunnel | ||
if: ${{ failure() }} | ||
uses: wa5i/ssh-to-actions@main | ||
with: | ||
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }} | ||
NPS_SERVER: ${{ secrets.NPS_SERVER }} | ||
NPS_VKEY: ${{ secrets.NPS_VKEY }} | ||
build-windows: | ||
strategy: | ||
matrix: | ||
platform: | ||
- arch: win64 | ||
config: VC-WIN64A | ||
- arch: win32 | ||
config: VC-WIN32 | ||
runs-on: windows-2019 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: ${{ matrix.platform.arch }} | ||
- uses: ilammy/setup-nasm@v1 | ||
with: | ||
platform: ${{ matrix.platform.arch }} | ||
- uses: shogo82148/actions-setup-perl@v1 | ||
- name: prepare the build directory | ||
run: mkdir _build | ||
- name: config | ||
working-directory: _build | ||
run: | | ||
perl ..\Configure no-makedepend ${{ matrix.platform.config }} enable-ssl-trace enable-crypto-mdebug no-crypto-mdebug-backtrace enable-egd enable-ntls enable-optimize-chacha enable-status enable-cert-compression enable-delegated-credential enable-ec_elgamal enable-sm2 enable-sm3 enable-sm4 enable-dynamic-ciphers enable-session-lookup enable-session-reused-type enable-rsa-multi-prime-key-compat enable-skip-scsv enable-verify-sni enable-evp-cipher-api-compat enable-dycert-ocsp | ||
perl configdata.pm --dump | ||
- name: build | ||
working-directory: _build | ||
run: nmake /S | ||
- name: install | ||
run: | | ||
mkdir ..\tongsuo | ||
nmake install DESTDIR=..\tongsuo | ||
working-directory: _build | ||
- name: pack | ||
run: tar zcvf .\tongsuo-${{ matrix.platform.arch }}.tar.gz .\tongsuo | ||
- name: upload | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
tongsuo-${{ matrix.platform.arch }}.tar.gz | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: debug with ssh tunnel | ||
if: ${{ failure() }} | ||
uses: wa5i/ssh-to-actions@main | ||
with: | ||
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }} | ||
NPS_SERVER: ${{ secrets.NPS_SERVER }} | ||
NPS_VKEY: ${{ secrets.NPS_VKEY }} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
windows也用tar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不是说你打包的环境,而是大多数用户的windows环境里都自带tar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看起来直接zip一下貌似就OK了。zip好像windows里默认可以解压缩