diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml new file mode 100644 index 0000000000..7cb8655768 --- /dev/null +++ b/.github/workflows/appimage.yml @@ -0,0 +1,64 @@ +name: AppImage +on: + pull_request: + push: + branches: + - master + tags: + - v* + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + appimage: + name: AppImage + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Dependencies + run: ./ci/appimage.deps.sh + + - name: Build + run: ./ci/appimage.build.sh + + - name: Deploy + run: | + export GITTAGNOV=$(echo "$GITHUB_REF" | sed "s/.*\///;s/^v//") + export BUILD_ARTIFACTSTAGINGDIRECTORY="$PWD/staging" + mkdir -p "$BUILD_ARTIFACTSTAGINGDIRECTORY" + ./ci/appimage.deploy.sh + + - name: Upload build + uses: actions/upload-artifact@v4 + with: + name: appimage + path: | + staging/*.* + + - name: Continuous + uses: softprops/action-gh-release@v2 + if: github.event_name != 'pull_request' + with: + name: "Continuous" + tag_name: "continuous" + body: "" + append_body: true + generate_release_notes: false + files: | + staging/*.* + + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' + with: + body: "" + append_body: true + generate_release_notes: false + files: | + staging/*.* diff --git a/.github/workflows/continuous.yaml b/.github/workflows/continuous.yaml deleted file mode 100644 index dec6fab583..0000000000 --- a/.github/workflows/continuous.yaml +++ /dev/null @@ -1,208 +0,0 @@ -name: Continuous build -on: - pull_request: - push: - branches: - - master - tags: - - v* - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - tarball: - name: Tarball - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - - name: Build - run: ./ci/tarball.build.sh - env: - GPG_SIGN_PUBKEY: ${{ secrets.GPG_SIGN_PUBKEY }} - GPG_SIGN_PRIVKEY: ${{ secrets.GPG_SIGN_PRIVKEY }} - - - name: Deploy - run: | - export GITTAGNOV=$(echo "$GITHUB_REF" | sed "s/.*\///;s/^v//") - export BUILD_ARTIFACTSTAGINGDIRECTORY="$PWD/staging" - mkdir -p "$BUILD_ARTIFACTSTAGINGDIRECTORY" - ./ci/tarball.deploy.sh - - - name: Upload build - uses: actions/upload-artifact@v4 - with: - name: tarball - path: | - staging/*.* - - - name: Continuous - uses: softprops/action-gh-release@v2 - if: github.event_name != 'pull_request' - with: - name: "Continuous" - tag_name: "continuous" - body: "" - append_body: true - generate_release_notes: false - files: | - staging/*.* - - appimage: - name: AppImage - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - - name: Dependencies - run: ./ci/appimage.deps.sh - - - name: Build - run: ./ci/appimage.build.sh - - - name: Deploy - run: | - export GITTAGNOV=$(echo "$GITHUB_REF" | sed "s/.*\///;s/^v//") - export BUILD_ARTIFACTSTAGINGDIRECTORY="$PWD/staging" - mkdir -p "$BUILD_ARTIFACTSTAGINGDIRECTORY" - ./ci/appimage.deploy.sh - - - name: Upload build - uses: actions/upload-artifact@v4 - with: - name: appimage - path: | - staging/*.* - - - name: Continuous - uses: softprops/action-gh-release@v2 - if: github.event_name != 'pull_request' - with: - name: "Continuous" - tag_name: "continuous" - body: "" - append_body: true - generate_release_notes: false - files: | - staging/*.* - - macintel: - name: macOS (Intel) - runs-on: macos-13 - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - - name: Dependencies - run: ./ci/osx-package.deps.sh - env: - MACOS_ARCH: "x86_64" - MAC_CERT_B64: ${{ secrets.MAC_CERT_B64 }} - MAC_CODESIGN_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }} - - - uses: jcelerier/import-codesign-certs@master - with: - p12-file-base64: ${{ secrets.MAC_CERT_B64 }} - p12-password: ${{ secrets.MAC_CERT_PASSWORD }} - - - name: Build - run: ./ci/osx-package.build.sh - env: - MACOS_ARCH: "x86_64" - - - run: | - export GITTAGNOV=$(echo "$GITHUB_REF" | sed "s/.*\///;s/^v//") - export BUILD_ARTIFACTSTAGINGDIRECTORY=$PWD/staging - mkdir -p $BUILD_ARTIFACTSTAGINGDIRECTORY - source ci/osx-package.deploy.sh - env: - MACOS_ARCH: "x86_64" - MAC_ALTOOL_PASSWORD: ${{ secrets.MAC_ALTOOL_PASSWORD }} - - - name: Upload build - uses: actions/upload-artifact@v4 - with: - name: macos-intel - path: | - staging/*.* - - - name: Continuous - uses: softprops/action-gh-release@v2 - if: github.event_name != 'pull_request' - with: - name: "Continuous" - tag_name: "continuous" - body: "" - append_body: true - generate_release_notes: false - files: | - staging/*.* - -# - name: Release -# uses: softprops/action-gh-release@v2 -# if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' -# with: -# body: "" -# append_body: true -# generate_release_notes: false -# files: | -# staging/*.* - - - win32: - name: Windows - runs-on: windows-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - - name: Dependencies - shell: bash - run: ./ci/win32.deps.sh - - - name: Build - shell: bash - run: ./ci/win32.build.sh - - - name: Deploy - shell: bash - run: | - export GITTAGNOV=$(echo "$GITHUB_REF" | sed "s/.*\///;s/^v//") - export BUILD_ARTIFACTSTAGINGDIRECTORY="$PWD/staging" - mkdir -p "$BUILD_ARTIFACTSTAGINGDIRECTORY" - ./ci/win32.deploy.sh - - - name: Upload build - uses: actions/upload-artifact@v4 - with: - name: windows - path: | - staging/*.* - - - name: Continuous - uses: softprops/action-gh-release@v2 - if: github.event_name != 'pull_request' - with: - name: "Continuous" - tag_name: "continuous" - body: "" - append_body: true - generate_release_notes: false - files: | - staging/*.* diff --git a/.github/workflows/mac-builds.yaml b/.github/workflows/mac-builds.yaml index d6cbaa1c6f..c899e5b46c 100644 --- a/.github/workflows/mac-builds.yaml +++ b/.github/workflows/mac-builds.yaml @@ -12,6 +12,74 @@ concurrency: cancel-in-progress: true jobs: + macintel: + name: macOS (Intel) + runs-on: macos-13 + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Dependencies + run: ./ci/osx-package.deps.sh + env: + MACOS_ARCH: "x86_64" + MAC_CERT_B64: ${{ secrets.MAC_CERT_B64 }} + MAC_CODESIGN_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }} + + - uses: jcelerier/import-codesign-certs@master + with: + p12-file-base64: ${{ secrets.MAC_CERT_B64 }} + p12-password: ${{ secrets.MAC_CERT_PASSWORD }} + + - name: Build + run: ./ci/osx-package.build.sh + env: + MACOS_ARCH: "x86_64" + + - run: | + export GITTAGNOV=$(echo "$GITHUB_REF" | sed "s/.*\///;s/^v//") + export BUILD_ARTIFACTSTAGINGDIRECTORY=$PWD/staging + mkdir -p $BUILD_ARTIFACTSTAGINGDIRECTORY + source ci/osx-package.deploy.sh + env: + MACOS_ARCH: "x86_64" + MAC_ALTOOL_PASSWORD: ${{ secrets.MAC_ALTOOL_PASSWORD }} + + - name: Upload build + uses: actions/upload-artifact@v4 + with: + name: macos-intel + path: | + staging/*.* + + - name: Continuous + uses: softprops/action-gh-release@v2 + if: github.event_name != 'pull_request' + with: + name: "Continuous" + tag_name: "continuous" + body: "" + append_body: true + generate_release_notes: false + files: | + staging/*.* + + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' + with: + body: "" + append_body: true + generate_release_notes: false + files: | + staging/*.* + brew: # Last X86 macos version supported by GH Actions name: macOS (Release, Brew, Intel) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml new file mode 100644 index 0000000000..2cd761fc2f --- /dev/null +++ b/.github/workflows/tarball.yml @@ -0,0 +1,64 @@ +name: Tarball +on: + pull_request: + push: + branches: + - master + tags: + - v* + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + tarball: + name: Tarball + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Build + run: ./ci/tarball.build.sh + env: + GPG_SIGN_PUBKEY: ${{ secrets.GPG_SIGN_PUBKEY }} + GPG_SIGN_PRIVKEY: ${{ secrets.GPG_SIGN_PRIVKEY }} + + - name: Deploy + run: | + export GITTAGNOV=$(echo "$GITHUB_REF" | sed "s/.*\///;s/^v//") + export BUILD_ARTIFACTSTAGINGDIRECTORY="$PWD/staging" + mkdir -p "$BUILD_ARTIFACTSTAGINGDIRECTORY" + ./ci/tarball.deploy.sh + + - name: Upload build + uses: actions/upload-artifact@v4 + with: + name: tarball + path: | + staging/*.* + + - name: Continuous + uses: softprops/action-gh-release@v2 + if: github.event_name != 'pull_request' + with: + name: "Continuous" + tag_name: "continuous" + body: "" + append_body: true + generate_release_notes: true + files: | + staging/*.* + + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' + with: + body: "" + append_body: true + generate_release_notes: true + files: | + staging/*.* diff --git a/.github/workflows/win-builds.yaml b/.github/workflows/win-builds.yaml index 01a1a7573f..66f890d581 100644 --- a/.github/workflows/win-builds.yaml +++ b/.github/workflows/win-builds.yaml @@ -12,6 +12,60 @@ concurrency: cancel-in-progress: true jobs: + win32: + name: Windows + runs-on: windows-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Dependencies + shell: bash + run: ./ci/win32.deps.sh + + - name: Build + shell: bash + run: ./ci/win32.build.sh + + - name: Deploy + shell: bash + run: | + export GITTAGNOV=$(echo "$GITHUB_REF" | sed "s/.*\///;s/^v//") + export BUILD_ARTIFACTSTAGINGDIRECTORY="$PWD/staging" + mkdir -p "$BUILD_ARTIFACTSTAGINGDIRECTORY" + ./ci/win32.deploy.sh + + - name: Upload build + uses: actions/upload-artifact@v4 + with: + name: windows + path: | + staging/*.* + + - name: Continuous + uses: softprops/action-gh-release@v2 + if: github.event_name != 'pull_request' + with: + name: "Continuous" + tag_name: "continuous" + body: "" + append_body: true + generate_release_notes: false + files: | + staging/*.* + + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' + with: + body: "" + append_body: true + generate_release_notes: false + files: | + staging/*.* + winstore: name: Windows (store) runs-on: windows-latest diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 1007292941..0000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,178 +0,0 @@ -trigger: - branches: - include: - - "*" - tags: - include: - - "*" - exclude: - - "continuous" -pr: - - "*" - -variables: - isGitTag: $[startsWith(variables['Build.SourceBranch'], 'refs/tags/')] - gitTag: $[replace(replace(variables['Build.SourceBranch'], 'refs/tags/', ''), 'refs/heads/', '')] - gitTagNoV: $[replace(replace(replace(variables['Build.SourceBranch'], 'refs/tags/v', ''), 'refs/heads', ''), '/', '')] - isMaster: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] - - -stages: - - stage: Build - jobs: - - job: Win32 - displayName: Win32 - pool: - vmImage: "windows-latest" - - steps: - - checkout: self - submodules: recursive - - - bash: | - source ci/win32.deps.sh - - - bash: | - source ci/win32.build.sh - - - bash: | - source ci/win32.deploy.sh - - displayName: Build - - - task: PublishPipelineArtifact@1 - inputs: - targetPath: "$(Build.ArtifactStagingDirectory)" - artifactName: Windows - - - job: AppImage - displayName: AppImage - pool: - vmImage: "ubuntu-latest" - - steps: - - checkout: self - submodules: recursive - - - bash: | - source ci/appimage.deps.sh - - bash: | - source ci/appimage.build.sh - - bash: | - source ci/appimage.deploy.sh - - - task: PublishPipelineArtifact@1 - inputs: - targetPath: "$(Build.ArtifactStagingDirectory)/" - artifactName: Linux - - - job: macOS - displayName: macOS - pool: - vmImage: "macos-13" - variables: - - group: macos - - steps: - - checkout: self - submodules: recursive - - - task: DownloadSecureFile@1 - name: codesign - displayName: "Download codesign certificate" - inputs: - secureFile: "ossia-cert.p12" - - - bash: | - source ci/osx-package.deps.sh - env: - MACOS_ARCH: "x86_64" - MAC_CODESIGN_PASSWORD: $(codesign) - MAC_ALTOOL_PASSWORD: $(altool) - - bash: | - source ci/osx-package.build.sh - env: - MACOS_ARCH: "x86_64" - - bash: | - source ci/osx-package.deploy.sh - env: - MACOS_ARCH: "x86_64" - MAC_CODESIGN_PASSWORD: $(codesign) - MAC_ALTOOL_PASSWORD: $(altool) - CI_IS_AZURE: 1 - - - task: PublishPipelineArtifact@1 - inputs: - targetPath: "$(Build.ArtifactStagingDirectory)" - artifactName: macOS-x86_64 - - - job: Tarball - displayName: Tarball - pool: - vmImage: "ubuntu-latest" - - steps: - - checkout: self - submodules: recursive - - - task: DownloadSecureFile@1 - name: pubkey - displayName: "Download CA certificate" - inputs: - secureFile: "sign-ossia-travis.pub.asc" - - task: DownloadSecureFile@1 - name: privkey - displayName: "Download CA certificate" - inputs: - secureFile: "sign-ossia-travis.priv.asc" - - - bash: | - source ci/tarball.build.sh - - bash: | - source ci/tarball.deploy.sh - - - task: PublishPipelineArtifact@1 - inputs: - targetPath: "$(Build.ArtifactStagingDirectory)" - artifactName: Source - - - stage: Upload - condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) - jobs: - - job: - pool: - vmImage: "ubuntu-20.04" - steps: - - checkout: none - - - task: DownloadPipelineArtifact@2 - inputs: - source: "current" - path: "$(System.DefaultWorkingDirectory)" - - - bash: | - cd "$(System.DefaultWorkingDirectory)" - find . -type f -exec mv {} . \; - ls - gh release delete-asset -y continuous ossia.score-master-macOS-Intel.dmg || true - gh release delete-asset -y continuous mac-sdk || true - gh release delete-asset -y continuous ossia.score-master-win64.exe || true - gh release delete-asset -y continuous windows-sdk.zip || true - gh release delete-asset -y continuous ossia.score-master-linux-amd64.AppImage || true - gh release delete-asset -y continuous linux-sdk.zip || true - gh release delete-asset -y continuous "ossia score-master-macOS-Intel.dmg" || true - gh release delete-asset -y continuous "ossia score-master-win64.exe" || true - gh release delete-asset -y continuous "ossia score-master-linux-amd64.AppImage" || true - - - task: GitHubRelease@1 - condition: and(succeeded(), eq(variables.isGitTag, true)) - inputs: - gitHubConnection: github.com_jcelerier - repositoryName: ossia/score - action: "edit" - target: "$(Build.SourceVersion)" - tag: "$(gitTag)" - assets: "$(System.DefaultWorkingDirectory)/*" - tagSource: userSpecifiedTag - title: "$(gitTag)" - assetUploadMode: "replace"