From 20b9c6dacadf7b74b4a3613dc9a2aad133bdba1a Mon Sep 17 00:00:00 2001 From: Yaosheng Zhang Date: Fri, 14 Jul 2023 15:43:02 -0700 Subject: [PATCH] container --- .github/workflows/release.yml | 54 +++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 622319ee3..147fa953c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,30 +16,62 @@ jobs: - uses: actions/checkout@v3 - uses: taiki-e/create-gh-release-action@v1 with: - prefix: mountpoint-s3(-[a-z]+)? + prefix: mountpoint-s3 draft: true # TODO: set it true after we have changlog template reviewed. changelog: false # TODO: set it false after we have changlog template reviewed. allow-missing-changelog: true - branch: main + # branch: main title: "Mountpoint for Amazon S3 v$version" token: ${{ secrets.GITHUB_TOKEN }} upload-assets: name: Build and release on target ${{ matrix.runner.target}} runs-on: ${{ matrix.runner.tags }} + container: centos:7 strategy: fail-fast: false matrix: runner: - - tags: [ubuntu-20.04] # GitHub-hosted - target: x86_64-unknown-linux-gnu + # specified `ami_filter` with certain amzn2 image so every time terraform provision ec2 instance will have same OS. + # - tags: [self-hosted, linux, x64] + - tags: ubuntu-latest + target: ubuntu-latest - tags: [self-hosted, linux, arm64] - target: aarch64-unknown-linux-gnu - + target: amzn2-kernel-5.10-arm64 steps: + - name: Install dependencies + run: | + yum -y install epel-release + yum -y update + yum makecache + + yum -y install fuse fuse-devel + yum -y install jq + + yum -y groupinstall "Development Tools" + yum -y install wget perl-CPAN gettext-devel perl-devel openssl-devel zlib-devel curl-devel expat-devel getopt asciidoc xmlto docbook2X + ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi + yum -y install wget curl + export VER="v2.18.1" + wget https://github.com/git/git/archive/${VER}.tar.gz + tar -xvf ${VER}.tar.gz + rm -f ${VER}.tar.gz + cd git-* + make configure + ./configure --prefix=/usr + make + make install + + yum -y install cmake3 clang-devel pkgconfig llvm-devl libunwind-devel + + type -p yum-config-manager >/dev/null || sudo yum install yum-utils -y + yum-config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo -y + yum install gh -y + yum update gh -y + - name: Checkout source code uses: actions/checkout@v3 with: @@ -49,10 +81,10 @@ jobs: with: toolchain: stable override: true - - name: Install operating system dependencies - uses: ./.github/actions/install-dependencies - with: - fuseVersion: 2 + # - name: Install operating system dependencies + # uses: ./.github/actions/install-dependencies + # with: + # fuseVersion: 2 - name: Release mount-s3 binary uses: taiki-e/upload-rust-binary-action@v1 with: @@ -60,5 +92,3 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} checksum: sha512 asset: LICENSE - -