Skip to content

Commit

Permalink
Moved linux amd64 build do gh
Browse files Browse the repository at this point in the history
  • Loading branch information
michalszmidt committed Sep 4, 2023
1 parent b9c78bc commit 67b5813
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 106 deletions.
106 changes: 0 additions & 106 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,121 +1,36 @@
task:
name: LinuxGlibcAmd64
only_if: $CIRRUS_BRANCH == 'main'
only_if: $CIRRUS_RELEASE != ''
env:
GITHUB_TOKEN: ENCRYPTED[c55719815e6b9431df4596dc746645ece3acbd2917ffa29c71a1636d232aa77b7a3684b31667de46f028ca594d7a4b20]
CARGO_TERM_COLOR: always

container:
image: fedora:latest
cpu: 4

prepare_script:
- whoami
- dnf check-update -q && dnf up -q -y
- dnf group install -y "C Development Tools and Libraries" "Development Tools"
- dnf in -y curl openssl-devel
- curl https://sh.rustup.rs -sSf | sh -s -- -y
- . $HOME/.cargo/env

build_script:
- whoami
- . $HOME/.cargo/env
- ls -lah
- rustc --version
- cargo build --release

hash_script:
- whoami
- ls -lah
- cd target/release
- mv hctl hctl-linux-glibc-amd64
- sha256sum hctl-linux-glibc-amd64 > sha256-hctl-linux-glibc-amd64
- mv hctl-linux-glibc-amd64 ../../ && mv sha256-hctl-linux-glibc-amd64 ../../

upload_script:
- whoami
- ls -lah
- files_to_upload=($(ls | grep hctl)); . ./upload.sh

task:
name: LinuxGlibcAarch64
only_if: $CIRRUS_BRANCH == 'main'
only_if: $CIRRUS_RELEASE != ''
env:
GITHUB_TOKEN: ENCRYPTED[c55719815e6b9431df4596dc746645ece3acbd2917ffa29c71a1636d232aa77b7a3684b31667de46f028ca594d7a4b20]
CARGO_TERM_COLOR: always

arm_container:
image: fedora:latest
cpu: 4

prepare_script:
- whoami
- dnf check-update -q && dnf up -q -y
- dnf group install -y "C Development Tools and Libraries" "Development Tools"
- dnf in -y curl openssl-devel
- curl https://sh.rustup.rs -sSf | sh -s -- -y
- . $HOME/.cargo/env

build_script:
- whoami
- . $HOME/.cargo/env
- ls -lah
- rustc --version
- cargo build --release

hash_script:
- whoami
- ls -lah
- cd target/release
- mv hctl hctl-linux-glibc-aarch64
- sha256sum hctl-linux-glibc-aarch64 > sha256-hctl-linux-glibc-aarch64
- mv hctl-linux-glibc-aarch64 ../../ && mv sha256-hctl-linux-glibc-aarch64 ../../

upload_script:
- whoami
- ls -lah
- files_to_upload=($(ls | grep hctl)); . ./upload.sh

task:
name: LinuxMuslAmd64
only_if: $CIRRUS_BRANCH == 'main'
only_if: $CIRRUS_RELEASE != ''
env:
GITHUB_TOKEN: ENCRYPTED[c55719815e6b9431df4596dc746645ece3acbd2917ffa29c71a1636d232aa77b7a3684b31667de46f028ca594d7a4b20]
CARGO_TERM_COLOR: always

container:
image: alpine:latest
cpu: 4

prepare_script:
- apk -U upgrade
- apk add curl make pkgconf bash build-base openssl openssl-dev openssl-libs-static
- curl https://sh.rustup.rs -sSf | sh -s -- -y
- . $HOME/.cargo/env

build_script:
- whoami
- . $HOME/.cargo/env
- ls -lah
- rustc --version
- cargo build --release

hash_script:
- whoami
- ls -lah
- cd target/release
- mv hctl hctl-linux-musl-amd64
- sha256sum hctl-linux-musl-amd64 > sha256-hctl-linux-musl-amd64
- mv hctl-linux-musl-amd64 ../../ && mv sha256-hctl-linux-musl-amd64 ../../

upload_script:
- whoami
- ls -lah
- files_to_upload=($(ls | grep hctl)); . ./upload.sh


task:
name: LinuxMuslAarch64
Expand All @@ -124,28 +39,22 @@ task:
env:
GITHUB_TOKEN: ENCRYPTED[c55719815e6b9431df4596dc746645ece3acbd2917ffa29c71a1636d232aa77b7a3684b31667de46f028ca594d7a4b20]
CARGO_TERM_COLOR: always

arm_container:
image: alpine:latest
cpu: 4

prepare_script:
- apk -U upgrade
- apk add curl make pkgconf bash build-base openssl openssl-dev openssl-libs-static rust cargo

build_script:
- whoami
- ls -lah
- rustc --version
- cargo build --release

hash_script:
- whoami
- cd target/release
- mv hctl hctl-linux-musl-aarch64
- sha256sum hctl-linux-musl-aarch64 > sha256-hctl-linux-musl-aarch64
- mv hctl-linux-musl-aarch64 ../../ && mv sha256-hctl-linux-musl-aarch64 ../../

upload_script:
- whoami
- ls -lah
Expand All @@ -158,11 +67,8 @@ task:
env:
GITHUB_TOKEN: ENCRYPTED[c55719815e6b9431df4596dc746645ece3acbd2917ffa29c71a1636d232aa77b7a3684b31667de46f028ca594d7a4b20]
CARGO_TERM_COLOR: always

freebsd_instance:
image_family: freebsd-13-2
cpu: 4

prepare_script:
- whoami
- mkdir -p /usr/local/etc/pkg/repos
Expand All @@ -172,21 +78,18 @@ task:
- pkg install -y curl pkgconf openssl bash
- curl https://sh.rustup.rs -sSf | sh -s -- -y
- . $HOME/.cargo/env

build_script:
- whoami
- . $HOME/.cargo/env
- ls -lah
- rustc --version
- cargo build --release

hash_script:
- whoami
- cd target/release
- mv hctl hctl-freebsd-amd64
- sha256sum hctl-freebsd-amd64 > sha256-hctl-freebsd-amd64
- mv hctl-freebsd-amd64 ../../ && mv sha256-hctl-freebsd-amd64 ../../

upload_script:
- whoami
- ls -lah
Expand All @@ -196,17 +99,11 @@ task:
name: MacosxSilicon
only_if: $CIRRUS_BRANCH == 'main'
only_if: $CIRRUS_RELEASE != ''

env:
GITHUB_TOKEN: ENCRYPTED[c55719815e6b9431df4596dc746645ece3acbd2917ffa29c71a1636d232aa77b7a3684b31667de46f028ca594d7a4b20]
CARGO_TERM_COLOR: always



macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
cpu: 4

prepare_script:
- whoami
- NONINTERACTIVE=1 brew update
Expand All @@ -215,21 +112,18 @@ task:
- NONINTERACTIVE=1 brew install pkg-config make curl coreutils openssl@3
- curl https://sh.rustup.rs -sSf | sh -s -- -y
- . $HOME/.cargo/env

build_script:
- whoami
- . $HOME/.cargo/env
- ls -lah
- rustc --version
- cargo build --release

hash_script:
- whoami
- cd target/release
- mv hctl hctl-macosx-silicon
- sha256sum hctl-macosx-silicon > sha256-hctl-macosx-silicon
- mv hctl-macosx-silicon ../../ && mv sha256-hctl-macosx-silicon ../../

upload_script:
- whoami
- ls -lah
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/release_linux_glibc_amd64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release for Linux glibc amd64

on: push

env:
CARGO_TERM_COLOR: always

jobs:
publish_for_linux_glibc_amd64:
name: Release for Linux glibc amd64
runs-on: ubuntu-latest
container: fedora:latest
steps:
- uses: actions/checkout@v3
- name: Compile
run: |
whoami
dnf group install -y "C Development Tools and Libraries" "Development Tools"
dnf in -y curl openssl-devel
rustup update
rustc --version
cargo build --release
cd target/release
mv hctl hctl-linux-glibc-amd64
sha256sum hctl-linux-glibc-amd64 > sha256-hctl-linux-glibc-amd64
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/hctl-linux-glibc-amd64
asset_name: hctl-linux-glibc-amd64
tag: ${{ github.ref }}
- name: Upload checksum to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/sha256-hctl-linux-glibc-amd64
asset_name: sha256-hctl-linux-glibc-amd64
tag: ${{ github.ref }}
39 changes: 39 additions & 0 deletions .github/workflows/release_linux_musl_amd64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release for Linux musl amd64

on: push

env:
CARGO_TERM_COLOR: always

jobs:
publish_for_linux_musl_amd64:
name: Release for Linux musl amd64
runs-on: ubuntu-latest
container: alpine:latest
steps:
- uses: actions/checkout@v3
- name: Compile
run: |
whoami
apk add curl make pkgconf bash build-base openssl openssl-dev openssl-libs-static
rustup update
rustc --version
cargo build --release
cd target/release
mv hctl hctl-linux-musl-amd64
sha256sum hctl-linux-musl-amd64 > sha256-hctl-linux-musl-amd64
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/hctl-linux-musl-amd64
asset_name: hctl-linux-musl-amd64
tag: ${{ github.ref }}
- name: Upload checksum to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/sha256-hctl-linux-musl-amd64
asset_name: sha256-hctl-linux-musl-amd64
tag: ${{ github.ref }}

0 comments on commit 67b5813

Please sign in to comment.