diff --git a/.github/workflows/nightly_old_linux_arm64.yml b/.github/workflows/nightly_old_linux_arm64.yml new file mode 100644 index 0000000000..eee4cf932b --- /dev/null +++ b/.github/workflows/nightly_old_linux_arm64.yml @@ -0,0 +1,41 @@ +on: + workflow_dispatch: + schedule: + - cron: '0 9 * * *' + +name: Nightly Release Old Linux arm64 using Earthly + +jobs: + build: + name: build and package nightly release + runs-on: [self-hosted, Linux, ARM64] + timeout-minutes: 90 + steps: + - uses: actions/checkout@v3 + + - name: get commit SHA + run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV + + - name: get date + run: echo "DATE=$(date "+%Y-%m-%d")" >> $GITHUB_ENV + + - name: build file name + env: + DATE: ${{ env.DATE }} + SHA: ${{ env.SHA }} + run: echo "RELEASE_FOLDER_NAME=roc_nightly-old_linux_arm64-$DATE-$SHA" >> $GITHUB_ENV + + - name: install earthly + run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete' + + - run: earthly --version + + - name: build release with earthly + run: earthly +build-nightly-release --RELEASE_FOLDER_NAME=${{ env.RELEASE_FOLDER_NAME }} --RUSTFLAGS="-C target-cpu=x86-64" + + - name: Upload roc nightly tar. Actually uploading to github releases has to be done manually. + uses: actions/upload-artifact@v3 + with: + name: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz + path: ${{ env.RELEASE_FOLDER_NAME }}.tar.gz + retention-days: 4 \ No newline at end of file diff --git a/.github/workflows/nightly_linux_x86_64_earthly.yml b/.github/workflows/nightly_old_linux_x86_64.yml similarity index 95% rename from .github/workflows/nightly_linux_x86_64_earthly.yml rename to .github/workflows/nightly_old_linux_x86_64.yml index 2d055307e7..03440f73e2 100644 --- a/.github/workflows/nightly_linux_x86_64_earthly.yml +++ b/.github/workflows/nightly_old_linux_x86_64.yml @@ -31,7 +31,7 @@ jobs: - run: earthly --version - name: build release with earthly - run: earthly +build-nightly-release --RELEASE_FOLDER_NAME=${{ env.RELEASE_FOLDER_NAME }} + run: earthly +build-nightly-release --RELEASE_FOLDER_NAME=${{ env.RELEASE_FOLDER_NAME }} --RUSTFLAGS="-C target-cpu=x86-64" - name: Upload roc nightly tar. Actually uploading to github releases has to be done manually. uses: actions/upload-artifact@v3 diff --git a/Earthfile b/Earthfile index e69c3364e7..30b0621280 100644 --- a/Earthfile +++ b/Earthfile @@ -44,11 +44,12 @@ copy-dirs: build-nightly-release: ARG RELEASE_FOLDER_NAME + ARG RUSTFLAGS FROM +copy-dirs COPY --dir .git LICENSE LEGAL_DETAILS ci ./ # version.txt is used by the CLI: roc --version RUN ./ci/write_version.sh - RUN RUSTFLAGS="-C target-cpu=x86-64" cargo build --profile=release-with-lto --locked --bin roc + RUN RUSTFLAGS=$RUSTFLAGS cargo build --profile=release-with-lto --locked --bin roc # strip debug info RUN strip ./target/release-with-lto/roc RUN ./ci/package_release.sh $RELEASE_FOLDER_NAME