Skip to content

Commit

Permalink
fix(ci): Fixes missing blobs
Browse files Browse the repository at this point in the history
This is a one off CI pipeline we will remove once we run it once, but
it should checkout and rebuild all versions.

Signed-off-by: Taylor Thomas <[email protected]>
  • Loading branch information
thomastaylor312 committed Sep 24, 2022
1 parent 9169642 commit 725562d
Showing 1 changed file with 156 additions and 0 deletions.
156 changes: 156 additions & 0 deletions .github/workflows/fixblob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
name: fixme
on:
workflow_dispatch:
jobs:
build:
name: build release assets
runs-on: ${{ matrix.config.os }}
env: ${{ matrix.config.env }}
strategy:
fail-fast: false
matrix:
version: [v0.6.0, v0.7.0, v0.7.1, v0.8.0, v0.8.1, v0.9.0-rc.1]
config:
- {
os: "ubuntu-latest",
arch: "amd64",
extension: "",
env: {},
targetPath: "target/release/",
}
- {
os: "macos-latest",
arch: "amd64",
extension: "",
env: {},
targetPath: "target/release/",
}
- {
os: "windows-latest",
arch: "amd64",
extension: ".exe",
env: {},
targetPath: "target/release/",
}
- {
os: "macos-latest",
arch: "aarch64",
extension: "",
env: {},
targetPath: "target/aarch64-apple-darwin/release/",
}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ matrix.version }}
fetch-depth: 0

- name: set the release version (tag)
shell: bash
run: echo "RELEASE_VERSION=${{ matrix.version }}" >> $GITHUB_ENV

- name: lowercase the runner OS name
shell: bash
run: |
OS=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')
echo "RUNNER_OS=$OS" >> $GITHUB_ENV
- name: Install latest Rust stable toolchain
uses: actions-rs/toolchain@v1
if: matrix.config.arch != 'aarch64'
with:
toolchain: stable
default: true
components: clippy, rustfmt

- name: setup for cross-compile builds
if: matrix.config.arch == 'aarch64' && matrix.config.os == 'ubuntu-latest'
run: |
sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
cd /tmp
git clone https://github.com/openssl/openssl
cd openssl
git checkout OpenSSL_1_1_1l
sudo mkdir -p $OPENSSL_DIR
./Configure linux-aarch64 --prefix=$OPENSSL_DIR --openssldir=$OPENSSL_DIR shared
make CC=aarch64-linux-gnu-gcc
sudo make install
rustup target add aarch64-unknown-linux-gnu
- name: Install latest Rust stable toolchain
uses: actions-rs/toolchain@v1
if: matrix.config.arch == 'aarch64' && matrix.config.os == 'macos-latest'
with:
toolchain: stable
default: true
components: clippy, rustfmt
target: aarch64-apple-darwin

- name: Install latest Rust stable toolchain
uses: actions-rs/toolchain@v1
if: matrix.config.arch == 'aarch64' && matrix.config.os == 'ubuntu-latest'
with:
toolchain: stable
default: true
components: clippy, rustfmt
target: aarch64-unknown-linux-gnu

- name: build release
uses: actions-rs/cargo@v1
if: matrix.config.arch != 'aarch64'
with:
command: build
args: "--all-features --release"

- name: build release
uses: actions-rs/cargo@v1
if: matrix.config.arch == 'aarch64' && matrix.config.os == 'macos-latest'
with:
command: build
args: "--all-features --release --target aarch64-apple-darwin"

- name: build release
uses: actions-rs/cargo@v1
if: matrix.config.arch == 'aarch64' && matrix.config.os == 'ubuntu-latest'
with:
command: build
args: "--all-features --release --target aarch64-unknown-linux-gnu"

- name: package release assets
shell: bash
run: |
mkdir _dist
cp README.md LICENSE.txt ${{ matrix.config.targetPath }}bindle${{ matrix.config.extension }} ${{ matrix.config.targetPath }}bindle-server${{ matrix.config.extension }} _dist/
cd _dist
tar czf bindle-${{ env.RELEASE_VERSION }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz README.md LICENSE.txt bindle${{ matrix.config.extension }} bindle-server${{ matrix.config.extension }}
- uses: actions/upload-artifact@v1
with:
name: bindle-${{ env.RELEASE_VERSION }}
path: _dist/bindle-${{ env.RELEASE_VERSION }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz
publish:
name: publish release assets
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
version: [v0.6.0, v0.7.0, v0.7.1, v0.8.0, v0.8.1]
steps:
- name: set the release version (tag)
shell: bash
run: echo "RELEASE_VERSION=${{ matrix.version }}" >> $GITHUB_ENV
- name: download release assets
uses: actions/download-artifact@v1
with:
name: bindle-${{ env.RELEASE_VERSION }}
- name: generate checksums
run: |
cd bindle-${{ env.RELEASE_VERSION }}
sha256sum * > checksums-${{ env.RELEASE_VERSION }}.txt
- name: upload to azure
uses: bacongobbler/[email protected]
with:
source_dir: bindle-${{ env.RELEASE_VERSION }}
container_name: releases
connection_string: ${{ secrets.AzureStorageConnectionString }}
overwrite: "true"

0 comments on commit 725562d

Please sign in to comment.