Skip to content

Commit

Permalink
Merge pull request #454 from fuzzland/fix-ci-build-error
Browse files Browse the repository at this point in the history
Fix ci build error
  • Loading branch information
jacob-chia authored Apr 3, 2024
2 parents 130beec + ec65869 commit bd18dca
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 79 deletions.
70 changes: 34 additions & 36 deletions .github/workflows/docker-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Docker Build ARM

on:
push:
branches: [ "master" ]
branches: ["master"]

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -31,61 +31,60 @@ jobs:
ec2-instance-type: c6gd.12xlarge
subnet-id: subnet-0bdfed1a35eccc1fe
security-group-id: sg-088af6a76c47f0e45
aws-resource-tags: >
aws-resource-tags: >
[
{"Key": "Name", "Value": "ec2-github-runner"},
{"Key": "GitHubRepository", "Value": "${{ github.repository }}"}
]
build:
needs: start-runner
runs-on: ${{ needs.start-runner.outputs.label }}
runs-on: ${{ needs.start-runner.outputs.label }}
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Login to Github Packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build image and push to Docker Hub and GitHub Container Registry
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/arm64
push: true
tags: |
fuzzland/ityfuzz:unstable-arm
ghcr.io/fuzzland/ityfuzz:unstable-arm
- name: Login to Github Packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Build image and push to Docker Hub and GitHub Container Registry
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/arm64
push: true
tags: |
fuzzland/ityfuzz:unstable-arm
ghcr.io/fuzzland/ityfuzz:unstable-arm
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

stop-runner:
name: Stop self-hosted EC2 runner
needs:
- start-runner
- build
runs-on: ubuntu-latest
if: ${{ always() }}
if: ${{ always() }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -100,4 +99,3 @@ jobs:
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
label: ${{ needs.start-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}

69 changes: 34 additions & 35 deletions .github/workflows/docker-x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Docker Build X86

on:
push:
branches: [ "master" ]
branches: ["master"]

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -31,60 +31,60 @@ jobs:
ec2-instance-type: c5d.12xlarge
subnet-id: subnet-0bdfed1a35eccc1fe
security-group-id: sg-088af6a76c47f0e45
aws-resource-tags: >
aws-resource-tags: >
[
{"Key": "Name", "Value": "ec2-github-runner"},
{"Key": "GitHubRepository", "Value": "${{ github.repository }}"}
]
build:
needs: start-runner
runs-on: ${{ needs.start-runner.outputs.label }}
runs-on: ${{ needs.start-runner.outputs.label }}
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Github Packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Github Packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build image and push to Docker Hub and GitHub Container Registry
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
push: true
tags: |
fuzzland/ityfuzz:unstable-x86
ghcr.io/fuzzland/ityfuzz:unstable-x86
- name: Build image and push to Docker Hub and GitHub Container Registry
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
push: true
tags: |
fuzzland/ityfuzz:unstable-x86
ghcr.io/fuzzland/ityfuzz:unstable-x86
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

stop-runner:
name: Stop self-hosted EC2 runner
needs:
- start-runner
- build
runs-on: ubuntu-latest
if: ${{ always() }}
if: ${{ always() }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -99,4 +99,3 @@ jobs:
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
label: ${{ needs.start-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}

16 changes: 9 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- cron: "0 0 * * *"
workflow_dispatch:

permissions: write-all

env:
IS_NIGHTLY: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
CARGO_TERM_COLOR: always
Expand All @@ -22,7 +24,7 @@ jobs:
release_name: ${{ steps.release_info.outputs.release_name }}
changelog: ${{ steps.build_changelog.outputs.changelog }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -43,7 +45,7 @@ jobs:
# the changelog.
- name: Create build-specific nightly tag
if: ${{ env.IS_NIGHTLY }}
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
TAG_NAME: ${{ steps.release_info.outputs.tag_name }}
with:
Expand Down Expand Up @@ -100,7 +102,7 @@ jobs:
svm_target_platform: windows-amd64

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: "nightly-2024-01-01"
Expand Down Expand Up @@ -211,19 +213,19 @@ jobs:
timeout-minutes: 30
needs: release
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Moves the `nightly` tag to `HEAD`
- name: Move nightly tag
if: ${{ env.IS_NIGHTLY }}
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const moveTag = require('./.github/scripts/move-tag.js')
await moveTag({ github, context }, 'nightly')
- name: Delete old nightlies
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const prunePrereleases = require('./.github/scripts/prune-prereleases.js')
Expand All @@ -236,7 +238,7 @@ jobs:
needs: [prepare, release, cleanup]
if: ${{ failure() }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
build:
runs-on: [self-hosted, integration-xl]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ github.event.pull_request.head.sha || github.sha }}
Expand Down

0 comments on commit bd18dca

Please sign in to comment.