Runtime Release Linux #72
Workflow file for this run
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
on: | ||
release: | ||
types: [created] | ||
workflow_dispatch: | ||
name: Runtime Release Linux | ||
jobs: | ||
blockless_runtime: | ||
strategy: | ||
matrix: | ||
include: | ||
- build: ubuntu-24.04 | ||
os: ubuntu-24.04 | ||
rust: stable | ||
runson: ubuntu-24.04 | ||
target: x86_64-unknown-linux-musl | ||
arch: x86_64 | ||
cross: false | ||
- build: linux | ||
os: linux-latest | ||
rust: stable | ||
runson: ubuntu-latest | ||
target: x86_64-unknown-linux-musl | ||
arch: x86_64 | ||
cross: false | ||
- build: linux_arm64 | ||
os: linux-latest | ||
runson: ubuntu-latest | ||
rust: stable | ||
target: aarch64-unknown-linux-musl | ||
arch: aarch64 | ||
cross: false | ||
runs-on: ${{ matrix.runson }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get release | ||
id: get_release | ||
uses: bruceadams/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: Edit Toml | ||
uses: dmikey/toml-editor@master | ||
with: | ||
file: "bls-runtime/Cargo.toml" | ||
key: "version" | ||
value: "${{ steps.get_release.outputs.tag_name }}" | ||
- name: Prepared Tools | ||
run: | | ||
echo `pwd` | ||
sudo apt install gcc-aarch64-linux-gnu | ||
curl https://musl.cc/aarch64-linux-musl-cross.tgz -o aarch64-linux-musl-cross.tgz | ||
tar xzvf aarch64-linux-musl-cross.tgz | ||
sudo mv aarch64-linux-musl-cross / | ||
echo `pwd` | ||
sudo apt-get install build-essential gcc musl-tools musl-dev make perl dkms | ||
sed "2 s/linker.*/linker = \"\/aarch64-linux-musl-cross\/bin\/aarch64-linux-musl-gcc\"/" .cargo/config.toml > tmp.toml | ||
mv tmp.toml .cargo/config.toml | ||
cat .cargo/config.toml | ||
- name: Install Libc | ||
run: | | ||
apt | ||
sudo apt install libc6-dev | ||
if: matrix.build == "ubuntu-24.04" | ||
Check failure on line 63 in .github/workflows/runtime_release_linux.yml GitHub Actions / Runtime Release LinuxInvalid workflow file
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: ${{ matrix.target }} | ||
- name: Add rust Target | ||
run: | | ||
rustup target add ${{ matrix.target }} | ||
rustup target list | ||
- name: Build runtime | ||
uses: actions-rs/cargo@v1 | ||
env: | ||
RUSTFLAGS: "-C link-arg=-L/usr/local/lib -C link-arg=-ldl" | ||
LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:/usr/local/lib" | ||
DYLD_LIBRARY_PATH: "$DYLD_LIBRARY_PATH:/usr/local/lib" | ||
AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR: /usr/local/include | ||
AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR: /usr/local/lib | ||
with: | ||
use-cross: ${{ matrix.cross }} | ||
command: build | ||
args: --release --all-features --target ${{ matrix.target }} | ||
- name: Remove File | ||
uses: JesseTG/[email protected] | ||
with: | ||
path: target/${{ matrix.target }}/release/.fingerprint | ||
- name: Remove File | ||
uses: JesseTG/[email protected] | ||
with: | ||
path: target/${{ matrix.target }}/release/examples | ||
- name: Remove File | ||
uses: JesseTG/[email protected] | ||
with: | ||
path: target/${{ matrix.target }}/release/build | ||
- name: Remove File | ||
uses: JesseTG/[email protected] | ||
with: | ||
path: target/${{ matrix.target }}/release/incremental | ||
- name: Remove File | ||
uses: JesseTG/[email protected] | ||
with: | ||
path: target/${{ matrix.target }}/release/examples | ||
- name: Remove File | ||
uses: JesseTG/[email protected] | ||
with: | ||
path: target/${{ matrix.target }}/release/deps | ||
- name: Remove Files | ||
run: | | ||
rm -rf target/${{ matrix.target }}/release/*.d | ||
rm -rf target/${{ matrix.target }}/release/*.rlib | ||
- name: Archive Release | ||
uses: thedoctor0/zip-release@main | ||
with: | ||
type: "tar" | ||
filename: ../../../blockless-runtime.${{ matrix.os }}.${{ matrix.arch }}.tar.gz | ||
directory: target/${{ matrix.target }}/release | ||
path: . | ||
- name: upload artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: blockless-runtime.${{ matrix.os }}.${{ matrix.arch }}.tar.gz | ||
asset_name: blockless-runtime.${{ matrix.os }}.${{ matrix.arch }}.tar.gz | ||
asset_content_type: application/gzip |